actions[] = $info; } public function addSelect(Select $info) { $this->selects[] = $info; } public function toString() { $ret = ''; $code = array(); foreach (array_reverse($this->selects) as $item) { $code[] = sprintf('%s', $item->toString()); } foreach (array_reverse($this->actions) as $item) { $code[] = sprintf('%s', $item->toString()); } $ret .= implode('', $code); return $ret; } }