/** * * @return \CsvWriter */ protected function get_writer() { if ($this->writer) { return $this->writer; } $writer = \CsvWriter::create(new \FileWriter($this->path)); $this->writer = $writer; return $writer; }