]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
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 | ||
12 | namespace Symfony\Component\Translation\Dumper; | |
13 | ||
14 | use Symfony\Component\Translation\MessageCatalogue; | |
15 | use Symfony\Component\Yaml\Yaml; | |
16 | ||
17 | /** | |
18 | * YamlFileDumper generates yaml files from a message catalogue. | |
19 | * | |
20 | * @author Michel Salib <michelsalib@hotmail.com> | |
21 | */ | |
22 | class YamlFileDumper extends FileDumper | |
23 | { | |
24 | /** | |
25 | * {@inheritDoc} | |
26 | */ | |
27 | protected function format(MessageCatalogue $messages, $domain) | |
28 | { | |
29 | return Yaml::dump($messages->all($domain)); | |
30 | } | |
31 | ||
32 | /** | |
33 | * {@inheritDoc} | |
34 | */ | |
35 | protected function getExtension() | |
36 | { | |
37 | return 'yml'; | |
38 | } | |
39 | } |