CsvFileDumper.php
2 months ago
DumperInterface.php
2 months ago
FileDumper.php
2 months ago
IcuResFileDumper.php
2 months ago
IniFileDumper.php
2 months ago
JsonFileDumper.php
2 months ago
MoFileDumper.php
2 months ago
PhpFileDumper.php
2 months ago
PoFileDumper.php
2 months ago
QtFileDumper.php
2 months ago
XliffFileDumper.php
2 months ago
YamlFileDumper.php
2 months ago
PhpFileDumper.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace ProfilePressVendor\Symfony\Component\Translation\Dumper; |
| 12 | |
| 13 | use ProfilePressVendor\Symfony\Component\Translation\MessageCatalogue; |
| 14 | /** |
| 15 | * PhpFileDumper generates PHP files from a message catalogue. |
| 16 | * |
| 17 | * @author Michel Salib <michelsalib@hotmail.com> |
| 18 | */ |
| 19 | class PhpFileDumper extends FileDumper |
| 20 | { |
| 21 | /** |
| 22 | * {@inheritdoc} |
| 23 | */ |
| 24 | public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) |
| 25 | { |
| 26 | return "<?php\n\nreturn " . var_export($messages->all($domain), \true) . ";\n"; |
| 27 | } |
| 28 | /** |
| 29 | * {@inheritdoc} |
| 30 | */ |
| 31 | protected function getExtension() |
| 32 | { |
| 33 | return 'php'; |
| 34 | } |
| 35 | } |
| 36 |