class YamlFileDumper in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Dumper/YamlFileDumper.php \Symfony\Component\Translation\Dumper\YamlFileDumper
YamlFileDumper generates yaml files from a message catalogue.
@author Michel Salib <michelsalib@hotmail.com>
Hierarchy
- class \Symfony\Component\Translation\Dumper\FileDumper implements DumperInterface
- class \Symfony\Component\Translation\Dumper\YamlFileDumper
Expanded class hierarchy of YamlFileDumper
1 file declares its use of YamlFileDumper
- YamlFileDumperTest.php in vendor/
symfony/ translation/ Tests/ Dumper/ YamlFileDumperTest.php
File
- vendor/
symfony/ translation/ Dumper/ YamlFileDumper.php, line 22
Namespace
Symfony\Component\Translation\DumperView source
class YamlFileDumper extends FileDumper {
/**
* {@inheritdoc}
*/
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));
}
/**
* {@inheritdoc}
*/
protected function getExtension() {
return 'yml';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FileDumper:: |
private | property | Make file backup before the dump. | |
FileDumper:: |
protected | property | A template for the relative paths to files. | 1 |
FileDumper:: |
public | function |
Dumps the message catalogue. Overrides DumperInterface:: |
1 |
FileDumper:: |
private | function | Gets the relative file path using the template. | |
FileDumper:: |
public | function | Sets backup flag. | |
FileDumper:: |
public | function | Sets the template for the relative paths to files. | |
YamlFileDumper:: |
protected | function |
Transforms a domain of a message catalogue to its string representation. Overrides FileDumper:: |
|
YamlFileDumper:: |
protected | function |
Gets the file extension of the dumper. Overrides FileDumper:: |