protected function YamlFileDumper::format in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Dumper/YamlFileDumper.php \Symfony\Component\Translation\Dumper\YamlFileDumper::format()
Transforms a domain of a message catalogue to its string representation.
Parameters
MessageCatalogue $messages:
string $domain:
Return value
string representation
Overrides FileDumper::format
File
- vendor/
symfony/ translation/ Dumper/ YamlFileDumper.php, line 27
Class
- YamlFileDumper
- YamlFileDumper generates yaml files from a message catalogue.
Namespace
Symfony\Component\Translation\DumperCode
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));
}