* * 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:----DEVHI0puFRk+zGoCZKtY/j0MRs+QIC6dR1uPA64sy2/iApNxVKk+LTG4NYdp1b4sKgBWpATgW+/dp91L0zgsPrdrkIIuh/T3NGcnOfquLMuYEe881TzISJzQxcLkg2SyTTC9BqIHnFChrNM9VCXI+8DfCu2wTTQwc5g2kS8MCcV6gR4T85v8gtT6kHDLCYZJ4hdP4HFvvnbebOobC0apDVF3d59klmOuV5X56TVxxXqMA3RGB6Vouwu7pQnB4hNEpRQn2hI34Z/LTVH/8IPlmHSvuybgSyZD9z/DIRHJaromM5tnBMklhLh/99/4G0RCQAkp4BJxCM1rc+nbYy2rZuBaGSNMsHnkMSIgzLnBnCauwRzcSZDQUSTjrId3UvwkUHIuDbdqndwVFmqzJghGt7HCTyTeaYhNmzuvXR6aSw/ZjziesOcFWgSGS/HCe6FpoR1SL4K3XtfChg9z+srcjh7mhEIXxdBkhXLuJ1d61UacOCaV4o+Yfb/jU7NGAOkXxIJVvBmfxp96vINwBoXaJE9d/lCxNX34xqAZHkQ1+xBL8TFj+BZCfDIGFETqQT3vgkvpTT1lwAsqQsIstytvQ6U1XANZ4AwlSJ4PD/Eww/FyPZAXMCau3p8/IB+5Q42oscKkrE8aNmrZPjlWNrCAVHF070SrZ/MGrvJ7KwXoUPg=----ATTACHMENT:----MzY1MTc5ODE0NzY5NDM5MiA2MTgxOTk0NDU5MjE1MTA1IDg4ODQ1NzE0NzIyNDgxNTg=