/** * {@inheritdoc} */ public function write(Phrase $phrase) { $fields = [$phrase->getCompiledPhrase(), $phrase->getCompiledTranslation()]; if (($contextType = $phrase->getContextType()) && ($contextValue = $phrase->getContextValueAsString())) { $fields[] = $contextType; $fields[] = $contextValue; } fputcsv($this->_fileHandler, $fields, ',', '"'); }