_csv = new SparkCSV(); $this->_csv->addHeader(['date', 'author']); } public function collect ($item) { $this->_csv->addRow([$item->date, $item->author]); } public function generateFeed () { return $this->_csv->render(); } }