public function JsonFileDumper::format in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/translation/Dumper/JsonFileDumper.php \Symfony\Component\Translation\Dumper\JsonFileDumper::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/ JsonFileDumper.php, line 26
Class
- JsonFileDumper
- JsonFileDumper generates an json formatted string representation of a message catalogue.
Namespace
Symfony\Component\Translation\DumperCode
public function format(MessageCatalogue $messages, $domain = 'messages') {
return json_encode($messages
->all($domain), defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0);
}