You are here

protected function PhpFileDumper::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/PhpFileDumper.php, line 26

Class

PhpFileDumper
PhpFileDumper generates PHP files from a message catalogue.

Namespace

Symfony\Component\Translation\Dumper

Code

protected function format(MessageCatalogue $messages, $domain) {
  $output = "<?php\n\nreturn " . var_export($messages
    ->all($domain), true) . ";\n";
  return $output;
}