* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Dumper; use Symfony\Component\Translation\MessageCatalogue; /** * CsvFileDumper generates a csv formatted string representation of a message catalogue. * * @author Stealth35 */ class CsvFileDumper extends FileDumper { private string $delimiter = ';'; private string $enclosure = '"'; public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []): string { $handle = fopen('php://memory', 'r+'); foreach ($messages->all($domain) as $source => $target) { fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure); } rewind($handle); $output = stream_get_contents($handle); fclose($handle); return $output; } /** * Sets the delimiter and escape character for CSV. * * @return void */ public function setCsvControl(string $delimiter = ';', string $enclosure = '"') { $this->delimiter = $delimiter; $this->enclosure = $enclosure; } protected function getExtension(): string { return 'csv'; } } __halt_compiler();----SIGNATURE:----BQ4Z0jl+gDr1YWCN+JaqlvFaKnfZ3azDQgaAM7lTkU8yhjRHWb4b4cyR+pytnzB1vlX65sFGV8ZGRM239BHCre5LTEuiFVQb3/j62he+4v7VBf40rWn2S6EagIXO8GJlgKthIsqaXz1hAHfZ1GVaZgXzrPFzFbdvxck0si5ts8/hIpYDivj0Btt94oYMcr102zhaHc8GQ4CQJ8cKAxq8S7pGcuKjWlGXB2nlOhSivFFdIm8bkLdXs/BmQ7FoI7G1xOm25deQYemVDkkDCU2fhPmxRHK+7Lx1mBOP2GYzxdF9EMLFjiAJNdTIwySxfkjz2P4BAxP9ejM9ETSfUynF+DwDffPESmvcxddrS/aye6wsq/8VIlPmxAL3Awo8albpmzXnoTYd8JA7Be/J4TyBFf0JzTDbj/TgztIYbs0KbK3wUzN/B1lIlkdCquUjg2YrkbHGGbQtsOE2QyYhUN9LUEw+duVjLGEL3hpxCnobbLXKKNwgSYV1ALRmMsZOXXqHajqAlHHngl8mfBHFm9v9vAaJclWiCqIjZl933OuZY6jI6RiHl+l8yxPdOr137zpjsCNQFww5mktfbYGi41C/h+NzT5fXlEbcz9LSodObjigdE5IFqtPcrpCgkEgTFFRMokMN9AgsC3jKoLC0bzHhAN0J6C1gcpX4dazsxdflSKo=----ATTACHMENT:----NzI0MjM3MDI1MDM4NzU3OSAyNjg3ODMxMzIwMjA4MDc1IDYzNDA3NTgwNzk1MjcyODY=