Doctrine\ORM\Query\Parser::InstanceOfExpression PHP Метод

InstanceOfExpression() публичный Метод

InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (AbstractSchemaName | InputParameter)
public InstanceOfExpression ( ) : Doctrine\ORM\Query\AST\InstanceOfExpression
Результат Doctrine\ORM\Query\AST\InstanceOfExpression
    public function InstanceOfExpression()
    {
        $instanceOfExpression = new AST\InstanceOfExpression($this->IdentificationVariable());

        if ($this->_lexer->isNextToken(Lexer::T_NOT)) {
            $this->match(Lexer::T_NOT);
            $instanceOfExpression->not = true;
        }

        $this->match(Lexer::T_INSTANCE);

        if ($this->_lexer->isNextToken(Lexer::T_OF)) {
            $this->match(Lexer::T_OF);
        }

        if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
            $this->match(Lexer::T_INPUT_PARAMETER);
            $exprValue = new AST\InputParameter($this->_lexer->token['value']);
        } else {
            $exprValue = $this->AliasIdentificationVariable();
        }

        $instanceOfExpression->value = $exprValue;
        
        return $instanceOfExpression;
    }
Parser