writer = $writer; } /** * @param QueryPartInterface $setClass * @param string $setOperation * @param $glue * * @return string */ protected function abstractWrite(QueryPartInterface $setClass, $setOperation, $glue) { $selects = []; foreach ($setClass->$setOperation() as $select) { $selects[] = $this->writer->write($select, false); } return \implode("\n".$glue."\n", $selects); } }