Zend Framework  1.12
Public Member Functions | Public Attributes | List of all members
Zend_Search_Lucene_Search_BooleanExpressionRecognizer Class Reference

Public Member Functions

 __construct ()
 Object constructor.
 
 processOperator ($operator)
 Process next operator.
 
 processLiteral ($literal)
 Process expression literal.
 
 finishExpression ()
 Finish an expression and return result.
 
 emptyOperatorAction ()
 default (omitted) operator processing
 
 emptyNotOperatorAction ()
 default (omitted) + NOT operator processing
 
 notOperatorAction ()
 NOT operator processing.
 
 orOperatorAction ()
 OR operator processing Close current conjunction.
 
 literalAction ()
 Literal processing.
 
- Public Member Functions inherited from Zend_Search_Lucene_FSM
 __construct ($states=array(), $inputAphabet=array(), $rules=array())
 Finite State machine constructor.
 
 addStates ($states)
 Add states to the state machine.
 
 addState ($state)
 Add state to the state machine.
 
 setState ($state)
 Set FSM state.
 
 getState ()
 Get FSM state.
 
 addInputSymbols ($inputAphabet)
 Add symbols to the input alphabet.
 
 addInputSymbol ($inputSymbol)
 Add symbol to the input alphabet.
 
 addRules ($rules)
 Add transition rules.
 
 addRule ($sourceState, $input, $targetState, $inputAction=null)
 Add symbol to the input alphabet.
 
 addEntryAction ($state, Zend_Search_Lucene_FSMAction $action)
 Add state entry action.
 
 addExitAction ($state, Zend_Search_Lucene_FSMAction $action)
 Add state exit action.
 
 addInputAction ($state, $inputSymbol, Zend_Search_Lucene_FSMAction $action)
 Add input action (defined by {state, input} pair).
 
 addTransitionAction ($sourceState, $targetState, Zend_Search_Lucene_FSMAction $action)
 Add transition action (defined by {state, input} pair).
 
 process ($input)
 Process an input.
 
 reset ()
 

Public Attributes

const ST_START = 0
 State Machine states.
 
const ST_LITERAL = 1
 
const ST_NOT_OPERATOR = 2
 
const ST_AND_OPERATOR = 3
 
const ST_OR_OPERATOR = 4
 
const IN_LITERAL = 0
 Input symbols.
 
const IN_NOT_OPERATOR = 1
 
const IN_AND_OPERATOR = 2
 
const IN_OR_OPERATOR = 3
 

Constructor & Destructor Documentation

__construct ( )

Object constructor.

Member Function Documentation

emptyNotOperatorAction ( )

default (omitted) + NOT operator processing

Zend_Search_Lucene_Search_QueryParser

emptyOperatorAction ( )

default (omitted) operator processing

Zend_Search_Lucene_Search_QueryParser

finishExpression ( )

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(<literal>, <is_negative>)

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

Returns
array
Exceptions
Zend_Search_Lucene_Exception
literalAction ( )

Literal processing.

notOperatorAction ( )

NOT operator processing.

orOperatorAction ( )

OR operator processing Close current conjunction.

processLiteral (   $literal)

Process expression literal.

Parameters
integer$operator
processOperator (   $operator)

Process next operator.

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

Parameters
integer$operator

Member Data Documentation

const IN_AND_OPERATOR = 2
const IN_LITERAL = 0

Input symbols.

const IN_NOT_OPERATOR = 1
const IN_OR_OPERATOR = 3
const ST_AND_OPERATOR = 3
const ST_LITERAL = 1
const ST_NOT_OPERATOR = 2
const ST_OR_OPERATOR = 4
const ST_START = 0

State Machine states.