YamlFileDumper.php in Zircon Profile 8
File
vendor/symfony/translation/Dumper/YamlFileDumper.php
View source
<?php
namespace Symfony\Component\Translation\Dumper;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Yaml\Yaml;
class YamlFileDumper extends FileDumper {
protected function format(MessageCatalogue $messages, $domain) {
if (!class_exists('Symfony\\Component\\Yaml\\Yaml')) {
throw new \LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.');
}
return Yaml::dump($messages
->all($domain));
}
protected function getExtension() {
return 'yml';
}
}
Classes
Name |
Description |
YamlFileDumper |
YamlFileDumper generates yaml files from a message catalogue. |