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

IndexBy() public method

IndexBy ::= "INDEX" "BY" StateFieldPathExpression
public IndexBy ( ) : Doctrine\ORM\Query\AST\IndexBy
return Doctrine\ORM\Query\AST\IndexBy
    public function IndexBy()
    {
        $this->match(Lexer::T_INDEX);
        $this->match(Lexer::T_BY);
        $pathExpr = $this->StateFieldPathExpression();

        // Add the INDEX BY info to the query component
        $this->_queryComponents[$pathExpr->identificationVariable]['map'] = $pathExpr->field;

        return new AST\IndexBy($pathExpr);
    }
Parser