<?phprequire_once("Part.php");classDoctrine_Query_GroupbyextendsDoctrine_Query_Part{/** * DQL GROUP BY PARSER * parses the group by part of the query string * @param string $str * @return void */finalpublicfunctionparse($str){$r=array();foreach(explode(",",$str)as$reference){$reference=trim($reference);$e=explode(".",$reference);$field=array_pop($e);$ref=implode(".",$e);$table=$this->query->load($ref);$component=$table->getComponentName();$r[]=$this->query->getTableAlias($ref).".".$field;}returnimplode(", ",$r);}publicfunction__toString(){return(!empty($this->parts))?implode(", ",$this->parts):'';}}