API Documentation

Search/Lucene/Search/BooleanExpressionRecognizer.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Search
version
$Id: BooleanExpressionRecognizer.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Search_Lucene_Search_BooleanExpressionRecognizer

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Search_Lucene_Search_BooleanExpressionRecognizer

Extends from
Zend_Search_Lucene_FSM
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Search_Lucene
subpackage
Search
Constants
ST_START
ST_LITERAL
ST_NOT_OPERATOR
ST_AND_OPERATOR
ST_OR_OPERATOR
IN_LITERAL
IN_NOT_OPERATOR
IN_AND_OPERATOR
IN_OR_OPERATOR
Properties
$_negativeLiteral
$_literal
$_conjunctions
$_currentConjunction
Methods
__construct
processOperator
processLiteral
finishExpression
emptyOperatorAction
emptyNotOperatorAction
notOperatorAction
orOperatorAction
literalAction

Description

Constants

ST_START

 ST_START = '0'

State Machine states

Details

value
0

ST_LITERAL

 ST_LITERAL = '1'

Details

value
1

ST_NOT_OPERATOR

 ST_NOT_OPERATOR = '2'

Details

value
2

ST_AND_OPERATOR

 ST_AND_OPERATOR = '3'

Details

value
3

ST_OR_OPERATOR

 ST_OR_OPERATOR = '4'

Details

value
4

IN_LITERAL

 IN_LITERAL = '0'

Input symbols

Details

value
0

IN_NOT_OPERATOR

 IN_NOT_OPERATOR = '1'

Details

value
1

IN_AND_OPERATOR

 IN_AND_OPERATOR = '2'

Details

value
2

IN_OR_OPERATOR

 IN_OR_OPERATOR = '3'

Details

value
3

Properties

$_conjunctions

array $_conjunctions = 'array'

Set of boolean query conjunctions

Each conjunction is an array of conjunction elements Each conjunction element is presented with two-elements array: array(, )

So, it has a structure: array( array( array(, ), // first literal of first conjuction array(, ), // second literal of first conjuction ... array(, ) ), // end of first conjuction array( array(, ), // first literal of second conjuction array(, ), // second literal of second conjuction ... array(, ) ), // end of second conjuction ... ) // end of structure

Details

$_conjunctions
array
visibility
private
default
array
final
false
static
false

$_currentConjunction

array $_currentConjunction = 'array'

Current conjuction

Details

$_currentConjunction
array
visibility
private
default
array
final
false
static
false

$_literal

mixed $_literal = ''

Current literal

Details

$_literal
mixed
visibility
private
default
final
false
static
false

$_negativeLiteral

boolean $_negativeLiteral = 'false'

NOT operator signal

Details

$_negativeLiteral
boolean
visibility
private
default
false
final
false
static
false

Methods

__construct

__construct( ) :

Object constructor

Details
visibility
public
final
false
static
false

emptyNotOperatorAction

emptyNotOperatorAction( ) :

default (omitted) + NOT operator processing

Details
visibility
public
final
false
static
false

emptyOperatorAction

emptyOperatorAction( ) :

default (omitted) operator processing

Details
visibility
public
final
false
static
false

finishExpression

finishExpression( ) : array

Finish an expression and return result

Result is a set of boolean query conjunctions

Each conjunction is an array of conjunction elements Each conjunction element is presented with two-elements array: array(, )

So, it has a structure: array( array( array(, ), // first literal of first conjuction array(, ), // second literal of first conjuction ... array(, ) ), // end of first conjuction array( array(, ), // first literal of second conjuction array(, ), // second literal of second conjuction ... array(, ) ), // end of second conjuction ... ) // end of structure

Output
array
Details
visibility
public
final
false
static
false
throws

literalAction

literalAction( ) :

Literal processing

Details
visibility
public
final
false
static
false

notOperatorAction

notOperatorAction( ) :

NOT operator processing

Details
visibility
public
final
false
static
false

orOperatorAction

orOperatorAction( ) :

OR operator processing Close current conjunction

Details
visibility
public
final
false
static
false

processLiteral

processLiteral(  $literal ) :

Process expression literal.

Arguments
$literal
Details
visibility
public
final
false
static
false

processOperator

processOperator( integer $operator ) :

Process next operator.

Operators are defined by class constants: IN_AND_OPERATOR, IN_OR_OPERATOR and IN_NOT_OPERATOR

Arguments
$operator
integer
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.