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

NewValue() public method

NOTE: Since it is not possible to correctly recognize individual types, here is the full grammar that needs to be supported: NewValue ::= SimpleArithmeticExpression | "NULL" SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression
public NewValue ( )
    public function NewValue()
    {
        if ($this->_lexer->isNextToken(Lexer::T_NULL)) {
            $this->match(Lexer::T_NULL);
            return null;
        } else if ($this->_lexer->isNextToken(Lexer::T_INPUT_PARAMETER)) {
            $this->match(Lexer::T_INPUT_PARAMETER);
            return new AST\InputParameter($this->_lexer->token['value']);
        }

        return $this->SimpleArithmeticExpression();
    }
Parser