data = $data; $this->typesMapping = $typesMapping; $this->tableName = $tableName; } /** * @return ResponseInterface|string */ public function export() { $exportedTable = new ExportedTable($this->data, $this->typesMapping, $this->tableName); $sqlCreator = new SqlCreator($exportedTable); return $sqlCreator->getExportSql(); } /** * @inheritdoc */ public function getFileExportResponse( ResponseInterface $originResponse = null ) { if ($originResponse === null) { $originResponse = new Response(); } $exportedString = $this->export(); return $this->preparePsrResponse($originResponse, $exportedString, 'export.sql'); } }