]> git.immae.eu Git - github/wallabag/wallabag.git/blame - vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php
gitignore vendor
[github/wallabag/wallabag.git] / vendor / symfony / translation / Symfony / Component / Translation / Dumper / YamlFileDumper.php
CommitLineData
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
12namespace Symfony\Component\Translation\Dumper;
13
14use Symfony\Component\Translation\MessageCatalogue;
15use Symfony\Component\Yaml\Yaml;
16
17/**
18 * YamlFileDumper generates yaml files from a message catalogue.
19 *
20 * @author Michel Salib <michelsalib@hotmail.com>
21 */
22class 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}