Doctrine\ORM\Query\Parser::InParameter PHP Méthode

InParameter() public méthode

InParameter ::= Literal | InputParameter
public InParameter ( ) : string
Résultat string | \Doctrine\ORM\Query\AST\InputParameter
    public function InParameter()
    {
        if ($this->_lexer->lookahead['type'] == Lexer::T_INPUT_PARAMETER) {
            return $this->InputParameter();
        }

        return $this->Literal();
    }

Usage Example

Exemple #1
0
 /**
  * Parse parameters
  *
  * @param \Doctrine\ORM\Query\Parser $parser
  */
 public function parse(\Doctrine\ORM\Query\Parser $parser)
 {
     $parser->match(Lexer::T_IDENTIFIER);
     $parser->match(Lexer::T_OPEN_PARENTHESIS);
     do {
         $this->columns[] = $parser->StateFieldPathExpression();
         $parser->match(Lexer::T_COMMA);
     } while ($parser->getLexer()->isNextToken(Lexer::T_IDENTIFIER));
     $this->needle = $parser->InParameter();
     $parser->match(Lexer::T_CLOSE_PARENTHESIS);
 }
Parser