Doctrine\ORM\Query\Parser::PathExpression PHP Méthode

PathExpression() public méthode

PathExpression ::= IdentificationVariable "." identifier
public PathExpression ( integer $expectedTypes ) : Doctrine\ORM\Query\AST\PathExpression
$expectedTypes integer
Résultat Doctrine\ORM\Query\AST\PathExpression
    public function PathExpression($expectedTypes)
    {
        $token = $this->_lexer->lookahead;
        $identVariable = $this->IdentificationVariable();
        $field = null;

        if ($this->_lexer->isNextToken(Lexer::T_DOT)) {
            $this->match(Lexer::T_DOT);
            $this->match(Lexer::T_IDENTIFIER);

            $field = $this->_lexer->token['value'];
        }
        
        // Creating AST node
        $pathExpr = new AST\PathExpression($expectedTypes, $identVariable, $field);

        // Defer PathExpression validation if requested to be defered
        $this->_deferredPathExpressions[] = array(
            'expression'   => $pathExpr,
            'nestingLevel' => $this->_nestingLevel,
            'token'        => $this->_lexer->token,
        );

        return $pathExpr;
    }
Parser