Doctrine\ORM\Query\Parser::StateFieldPathExpression PHP Method

StateFieldPathExpression() public method

StateFieldPathExpression ::= IdentificationVariable "." StateField
public StateFieldPathExpression ( ) : Doctrine\ORM\Query\AST\PathExpression
return Doctrine\ORM\Query\AST\PathExpression
    public function StateFieldPathExpression()
    {
        return $this->PathExpression(AST\PathExpression::TYPE_STATE_FIELD);
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @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);
 }
All Usage Examples Of Doctrine\ORM\Query\Parser::StateFieldPathExpression
Parser