You are here

public function JsonFileDumper::format in Plug 7

Transforms a domain of a message catalogue to its string representation.

Parameters

MessageCatalogue $messages:

string $domain:

Return value

string representation

Overrides FileDumper::format

File

lib/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);
}