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

ExistsExpression() public method

ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
public ExistsExpression ( ) : Doctrine\ORM\Query\AST\ExistsExpression
return Doctrine\ORM\Query\AST\ExistsExpression
    public function ExistsExpression()
    {
        $not = false;

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

        $this->match(Lexer::T_EXISTS);
        $this->match(Lexer::T_OPEN_PARENTHESIS);
        $existsExpression = new AST\ExistsExpression($this->Subselect());
        $existsExpression->not = $not;
        $this->match(Lexer::T_CLOSE_PARENTHESIS);

        return $existsExpression;
    }
Parser