StateFieldPathExpression ::= IdentificationVariable "." StateField
public StateFieldPathExpression ( ) : Doctrine\ORM\Query\AST\PathExpression | ||
return | Doctrine\ORM\Query\AST\PathExpression |
/** * @param Parser $parser */ public function parse(Parser $parser) { // match $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); // first Path Expression is mandatory $this->pathExp = array(); $this->pathExp[] = $parser->StateFieldPathExpression(); // Subsequent Path Expressions are optional $lexer = $parser->getLexer(); while ($lexer->isNextToken(Lexer::T_COMMA)) { $parser->match(Lexer::T_COMMA); $this->pathExp[] = $parser->StateFieldPathExpression(); } $parser->match(Lexer::T_CLOSE_PARENTHESIS); // against if (strtolower($lexer->lookahead['value']) !== 'against') { $parser->syntaxError('against'); } $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->against = $parser->StringPrimary(); if (strtolower($lexer->lookahead['value']) === 'boolean') { $parser->match(Lexer::T_IDENTIFIER); $this->booleanMode = true; } if (strtolower($lexer->lookahead['value']) === 'expand') { $parser->match(Lexer::T_IDENTIFIER); $this->queryExpansion = true; } $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
/** * @inheritdoc */ public function parse(Parser $parser) { $this->match = []; $this->mode = null; $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $lexer = $parser->getLexer(); for (;;) { $this->match[] = $parser->StateFieldPathExpression(); if (!$lexer->isNextToken(Lexer::T_COMMA)) { break; } $parser->match(Lexer::T_COMMA); } $parser->match(Lexer::T_CLOSE_PARENTHESIS); if (strtoupper($lexer->lookahead['value']) !== 'AGAINST') { $parser->syntaxError('AGAINST'); } $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->against = $parser->StringPrimary(); if ($lexer->isNextToken(Lexer::T_STRING)) { $parser->match(Lexer::T_STRING); $this->mode = $lexer->token['value']; } $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); //$this->datePart=$parser->StringPrimary(); $this->dateField = $parser->StateFieldPathExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
/** * Parse parameters * * @param \Doctrine\ORM\Query\Parser $parser */ public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); do { $this->columns[] = $parser->StateFieldPathExpression(); $parser->match(Lexer::T_COMMA); } while ($parser->getLexer()->isNextToken(Lexer::T_IDENTIFIER)); $this->needle = $parser->InParameter(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
/** * {@inheritdoc} */ public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->fieldName = $parser->Literal()->value; $parser->match(Lexer::T_COMMA); $this->columnExpression = $parser->StateFieldPathExpression(); $parser->match(Lexer::T_COMMA); $this->strategy = (int) $parser->Literal()->value; $parser->match(Lexer::T_CLOSE_PARENTHESIS); }