_isNextToken(Doctrine_Query_Token::T_SELECT)) { $this->SelectClause(); } $this->FromClause(); if ($this->_isNextToken(Doctrine_Query_Token::T_WHERE)) { $this->WhereClause(); } if ($this->_isNextToken(Doctrine_Query_Token::T_GROUP)) { $this->GroupByClause(); } if ($this->_isNextToken(Doctrine_Query_Token::T_HAVING)) { $this->HavingClause(); } if ($this->_isNextToken(Doctrine_Query_Token::T_ORDER)) { $this->OrderByClause(); } if ($this->_isNextToken(Doctrine_Query_Token::T_LIMIT)) { $this->LimitClause(); } } }