class PhpFileDumper in Plug 7
PhpFileDumper generates PHP files from a message catalogue.
@author Michel Salib <michelsalib@hotmail.com>
Hierarchy
- class \Symfony\Component\Translation\Dumper\FileDumper implements DumperInterface
- class \Symfony\Component\Translation\Dumper\PhpFileDumper
Expanded class hierarchy of PhpFileDumper
1 file declares its use of PhpFileDumper
- PhpFileDumperTest.php in lib/
Symfony/ translation/ Tests/ Dumper/ PhpFileDumperTest.php
File
- lib/
Symfony/ translation/ Dumper/ PhpFileDumper.php, line 21
Namespace
Symfony\Component\Translation\DumperView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FileDumper:: |
private | property | Make file backup before the dump. | |
FileDumper:: |
protected | property | A template for the relative paths to files. | 1 |
FileDumper:: |
public | function |
Dumps the message catalogue. Overrides DumperInterface:: |
1 |
FileDumper:: |
protected | function | Transforms a domain of a message catalogue to its string representation. | 1 |
FileDumper:: |
private | function | Gets the relative file path using the template. | |
FileDumper:: |
public | function | Sets backup flag. | |
FileDumper:: |
public | function | Sets the template for the relative paths to files. | |
PhpFileDumper:: |
protected | function |
Transforms a domain of a message catalogue to its string representation. Overrides FileDumper:: |
|
PhpFileDumper:: |
protected | function |
Gets the file extension of the dumper. Overrides FileDumper:: |