/** * @param $path * * writes csv file to the specified path */ public function write($path) { $this->init(); $this->renderHeader(); $this->renderContent(); file_put_contents($path, $this->csvWriter->__toString()); }