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

GroupByClause() public method

GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}*
public GroupByClause ( ) : Doctrine\ORM\Query\AST\GroupByClause
return Doctrine\ORM\Query\AST\GroupByClause
    public function GroupByClause()
    {
        $this->match(Lexer::T_GROUP);
        $this->match(Lexer::T_BY);

        $groupByItems = array($this->GroupByItem());

        while ($this->_lexer->isNextToken(Lexer::T_COMMA)) {
            $this->match(Lexer::T_COMMA);
            $groupByItems[] = $this->GroupByItem();
        }

        return new AST\GroupByClause($groupByItems);
    }
Parser