API Documentation

Zend/Search/Lucene/Search/QueryLexer.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Search_Lucene  
Subpackage
Search  
Version
$Id: QueryLexer.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Search_Lucene_Search_QueryLexer

Package: Zend\Search\Lucene\Search

Parent(s)
\Zend_Search_Lucene_FSM
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  ST_WHITE_SPACE = 0

State Machine states

Constant  ST_SYNT_LEXEME = 1
Constant  ST_LEXEME = 2
Constant  ST_QUOTED_LEXEME = 3
Constant  ST_ESCAPED_CHAR = 4
Constant  ST_ESCAPED_QCHAR = 5
Constant  ST_LEXEME_MODIFIER = 6
Constant  ST_NUMBER = 7
Constant  ST_MANTISSA = 8
Constant  ST_ERROR = 9
Constant  IN_WHITE_SPACE = 0

Input symbols

Constant  IN_SYNT_CHAR = 1
Constant  IN_LEXEME_MODIFIER = 2
Constant  IN_ESCAPE_CHAR = 3
Constant  IN_QUOTE = 4
Constant  IN_DECIMAL_POINT = 5
Constant  IN_ASCII_DIGIT = 6
Constant  IN_CHAR = 7
Constant  IN_MUTABLE_CHAR = 8
Constant  QUERY_WHITE_SPACE_CHARS = " \n\r\t"
Constant  QUERY_SYNT_CHARS = ':()[]{}!|&'
Constant  QUERY_MUTABLE_CHARS = '+-'
Constant  QUERY_DOUBLECHARLEXEME_CHARS = '|&'
Constant  QUERY_LEXEMEMODIFIER_CHARS = '~^'
Constant  QUERY_ASCIIDIGITS_CHARS = '0123456789'

Properties

Propertyprivatestring  $_currentLexeme= ''

Recognized part of current lexeme

Details
Type
string
Propertyprivatearray  $_lexemes= ''

List of recognized lexemes

Details
Type
array
Propertyprivatearray  $_queryString= ''

Query string (array of single- or non single-byte characters)

Details
Type
array
Propertyprivateinteger  $_queryStringPosition= ''

Current position within a query string Used to create appropriate error messages

Details
Type
integer

Methods

methodpublic__construct( ) : void

methodprivate_positionMsg( ) : string

Position message

Returns
Type Description
string
methodprivate_translateInput( string $char ) : integer

Translate input char to an input symbol of state machine

Parameters
Name Type Description
$char string
Returns
Type Description
integer
methodpublicaddLexeme( ) : void

Add lexeme

methodpublicaddLexemeChar( ) : void

Extend lexeme by one char

methodpublicaddLexemeModifier( ) : void

Add lexeme modifier

methodpublicaddNumberLexeme( ) : void

Add number lexeme

methodpublicaddQuerySyntaxLexeme( ) : void

Add query syntax lexeme

methodpublicaddQuotedLexeme( ) : void

Add quoted lexeme

methodpubliclexModifierErrException( ) : void

methodpublicquoteWithinLexemeErrException( ) : void

methodpublictokenize( string $inputString, string $encoding ) : array

This method is used to tokenize query string into lexemes

Parameters
Name Type Description
$inputString string
$encoding string
Returns
Type Description
array
Throws
Exception Description
\Zend_Search_Lucene_Search_QueryParserException
methodpublicwrongNumberErrException( ) : void

Documentation was generated by DocBlox 0.15.1.