ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}*
public ConditionalExpression ( ) : Doctrine\ORM\Query\AST\ConditionalExpression | ||
return | Doctrine\ORM\Query\AST\ConditionalExpression |
public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); // (2) $parser->match(Lexer::T_OPEN_PARENTHESIS); // (3) $this->var1 = $parser->ConditionalExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); // (3) }
public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->expr[] = $parser->ConditionalExpression(); for ($i = 0; $i < 2; ++$i) { $parser->match(Lexer::T_COMMA); $this->expr[] = $parser->ArithmeticExpression(); } $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
/** * Parse the DQL * * @param Parser $parser */ public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->condition = $parser->ConditionalExpression(); $parser->match(Lexer::T_COMMA); $this->firstResult = $parser->ArithmeticExpression(); $parser->match(Lexer::T_COMMA); $this->secondResult = $parser->ArithmeticExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
public function parse(Parser $parser) { $parser->match(Lexer::T_IDENTIFIER); $parser->match(Lexer::T_OPEN_PARENTHESIS); $this->condition = $parser->ConditionalExpression(); $parser->match(Lexer::T_COMMA); $this->isTrueStatement = $parser->ArithmeticExpression(); $parser->match(Lexer::T_COMMA); $this->isFalseStatement = $parser->ArithmeticExpression(); $parser->match(Lexer::T_CLOSE_PARENTHESIS); }
public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(\Doctrine\ORM\Query\Lexer::T_IDENTIFIER); $parser->match(\Doctrine\ORM\Query\Lexer::T_OPEN_PARENTHESIS); $this->expressions[] = $parser->ConditionalExpression(); for ($i = 0; $i < 2; $i++) { $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); $this->expressions[] = $parser->ArithmeticExpression(); } $parser->match(\Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS); }
/** * Parse function * * @param \Doctrine\ORM\Query\Parser $parser Parser * * @return void */ public function parse(\Doctrine\ORM\Query\Parser $parser) { $parser->match(\Doctrine\ORM\Query\Lexer::T_IDENTIFIER); $parser->match(\Doctrine\ORM\Query\Lexer::T_OPEN_PARENTHESIS); $this->ifCondition = $parser->ConditionalExpression(); $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); try { $this->ifThen = $parser->FunctionDeclaration(); } catch (\Doctrine\ORM\Query\QueryException $e) { $this->ifThen = $parser->ScalarExpression(); } $parser->match(\Doctrine\ORM\Query\Lexer::T_COMMA); try { $this->ifElse = $parser->FunctionDeclaration(); } catch (\Doctrine\ORM\Query\QueryException $e) { $this->ifElse = $parser->ScalarExpression(); } $parser->match(\Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS); }