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

InputParameter() public method

InputParameter ::= PositionalParameter | NamedParameter
public InputParameter ( ) : Doctrine\ORM\Query\AST\InputParameter
return Doctrine\ORM\Query\AST\InputParameter
    public function InputParameter()
    {
        $this->match(Lexer::T_INPUT_PARAMETER);

        return new AST\InputParameter($this->_lexer->token['value']);
    }

Usage Example

 public function parse(Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     $this->expr1 = $parser->StringPrimary();
     $parser->match(Lexer::T_COMMA);
     $this->expr2 = $parser->InputParameter();
     $parser->match(Lexer::T_COMMA);
     $this->expr3 = $parser->InputParameter();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Parser