You are here

public function JsonFileDumper::format in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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\Dumper

Code

public function format(MessageCatalogue $messages, $domain = 'messages') {
  return json_encode($messages
    ->all($domain), defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0);
}