You are here

protected function PhpFileDumper::format in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/translation/Dumper/PhpFileDumper.php \Symfony\Component\Translation\Dumper\PhpFileDumper::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/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;
}