/** * Saving data row array into file * * @param string $file * @param array $data * @return $this */ public function saveData($file, $data) { $fh = fopen($file, 'w'); foreach ($data as $dataRow) { $this->file->filePutCsv($fh, $dataRow, $this->_delimiter, $this->_enclosure); } fclose($fh); return $this; }