You are here

class PhpFileDumper in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/translation/Dumper/PhpFileDumper.php \Symfony\Component\Translation\Dumper\PhpFileDumper

PhpFileDumper generates PHP files from a message catalogue.

@author Michel Salib <michelsalib@hotmail.com>

Hierarchy

Expanded class hierarchy of PhpFileDumper

1 file declares its use of PhpFileDumper
PhpFileDumperTest.php in vendor/symfony/translation/Tests/Dumper/PhpFileDumperTest.php

File

vendor/symfony/translation/Dumper/PhpFileDumper.php, line 21

Namespace

Symfony\Component\Translation\Dumper
View source
class PhpFileDumper extends FileDumper {

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

  /**
   * {@inheritdoc}
   */
  protected function getExtension() {
    return 'php';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FileDumper::$backup private property Make file backup before the dump.
FileDumper::$relativePathTemplate protected property A template for the relative paths to files. 1
FileDumper::dump public function Dumps the message catalogue. Overrides DumperInterface::dump 1
FileDumper::getRelativePath private function Gets the relative file path using the template.
FileDumper::setBackup public function Sets backup flag.
FileDumper::setRelativePathTemplate public function Sets the template for the relative paths to files.
PhpFileDumper::format protected function Transforms a domain of a message catalogue to its string representation. Overrides FileDumper::format
PhpFileDumper::getExtension protected function Gets the file extension of the dumper. Overrides FileDumper::getExtension