/** * Merge this QueryBuilder's SELECT into the given QueryBuilder. * * @param QueryBuilder $QueryBuilder to merge into * @return QueryBuilder */ public function mergeSelectInto(QueryBuilder $QueryBuilder) { foreach ($this->option as $currentOption) { $QueryBuilder->option($currentOption); } foreach ($this->select as $currentColumn => $currentAlias) { $QueryBuilder->select($currentColumn, $currentAlias); } return $QueryBuilder; }