diff --git a/CsvWriter.php b/CsvWriter.php new file mode 100644 index 0000000..9655ba2 --- /dev/null +++ b/CsvWriter.php @@ -0,0 +1,26 @@ +source; + $filename = \Yii::$app->runtimePath . '/' . uniqid() . '.csv'; + + $fp = fopen($filename, 'w'); + + foreach ($exporter->export() as $rowNum => $row) { + fputcsv($fp, $row); + } + + return $filename; + } +}