/** * @param $postData * @param $profileName * @param $outputFile */ public function saveUnprocessedData($postData, $profileName, $outputFile) { if ($postData['session']['prevState'] === 'new') { $header = $this->transformerChain->composeHeader(); $this->fileIO->writeHeader($outputFile, $header); } $data = $this->transformerChain->transformForward($postData['data'][$profileName]); $this->fileIO->writeRecords($outputFile, $data); }
/** * @param LogDataStruct $logDataStruct */ public function writeToFile(LogDataStruct $logDataStruct) { $file = $this->getLogFile(); $this->fileWriter->writeRecords($file, array($logDataStruct->toArray())); }