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

GroupByItem() public method

GroupByItem ::= IdentificationVariable | SingleValuedPathExpression
public GroupByItem ( ) : string
return string | \Doctrine\ORM\Query\AST\PathExpression
    public function GroupByItem()
    {
        // We need to check if we are in a IdentificationVariable or SingleValuedPathExpression
        $glimpse = $this->_lexer->glimpse();

        if ($glimpse['type'] != Lexer::T_DOT) {
            $token = $this->_lexer->lookahead;
            $identVariable = $this->IdentificationVariable();

            return $identVariable;
        }

        return $this->SingleValuedPathExpression();
    }
Parser