diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 15:02:33 +0200 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-05-11 15:02:33 +0200 |
| commit | a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f (patch) | |
| tree | bf6e04c9bdba66e249fd6b78391e132da130848c /Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper | |
| parent | ea3fed0df4eaedd820f3f405502b62efe5952f8f (diff) | |
| download | InternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.tar.gz InternetTechnologien-a7e17cb70e9306f8887bd2b5ca1a37edcbe3ea0f.zip | |
Let composer manage its own files
Diffstat (limited to 'Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper')
12 files changed, 0 insertions, 796 deletions
diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php deleted file mode 100644 index 08005b0..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/CsvFileDumper.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * CsvFileDumper generates a csv formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class CsvFileDumper extends FileDumper -{ - private $delimiter = ';'; - private $enclosure = '"'; - - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - $handle = fopen('php://memory', 'rb+'); - - foreach ($messages->all($domain) as $source => $target) { - fputcsv($handle, array($source, $target), $this->delimiter, $this->enclosure); - } - - rewind($handle); - $output = stream_get_contents($handle); - fclose($handle); - - return $output; - } - - /** - * Sets the delimiter and escape character for CSV. - * - * @param string $delimiter delimiter character - * @param string $enclosure enclosure character - */ - public function setCsvControl($delimiter = ';', $enclosure = '"') - { - $this->delimiter = $delimiter; - $this->enclosure = $enclosure; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'csv'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php deleted file mode 100644 index cebc65e..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/DumperInterface.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * DumperInterface is the interface implemented by all translation dumpers. - * There is no common option. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -interface DumperInterface -{ - /** - * Dumps the message catalogue. - * - * @param MessageCatalogue $messages The message catalogue - * @param array $options Options that are used by the dumper - */ - public function dump(MessageCatalogue $messages, $options = array()); -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php deleted file mode 100644 index f2f17d6..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/FileDumper.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). - * Performs backup of already existing files. - * - * Options: - * - path (mandatory): the directory where the files should be saved - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -abstract class FileDumper implements DumperInterface -{ - /** - * A template for the relative paths to files. - * - * @var string - */ - protected $relativePathTemplate = '%domain%.%locale%.%extension%'; - - /** - * Make file backup before the dump. - * - * @var bool - */ - private $backup = true; - - /** - * Sets the template for the relative paths to files. - * - * @param string $relativePathTemplate A template for the relative paths to files - */ - public function setRelativePathTemplate($relativePathTemplate) - { - $this->relativePathTemplate = $relativePathTemplate; - } - - /** - * Sets backup flag. - * - * @param bool - */ - public function setBackup($backup) - { - $this->backup = $backup; - } - - /** - * {@inheritdoc} - */ - public function dump(MessageCatalogue $messages, $options = array()) - { - if (!array_key_exists('path', $options)) { - throw new \InvalidArgumentException('The file dumper needs a path option.'); - } - - // save a file for each domain - foreach ($messages->getDomains() as $domain) { - // backup - $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); - if (file_exists($fullpath)) { - if ($this->backup) { - copy($fullpath, $fullpath.'~'); - } - } else { - $directory = dirname($fullpath); - if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { - throw new \RuntimeException(sprintf('Unable to create directory "%s".', $directory)); - } - } - // save file - file_put_contents($fullpath, $this->format($messages, $domain)); - } - } - - /** - * Transforms a domain of a message catalogue to its string representation. - * - * @param MessageCatalogue $messages - * @param string $domain - * - * @return string representation - */ - abstract protected function format(MessageCatalogue $messages, $domain); - - /** - * Gets the file extension of the dumper. - * - * @return string file extension - */ - abstract protected function getExtension(); - - /** - * Gets the relative file path using the template. - * - * @param string $domain The domain - * @param string $locale The locale - * - * @return string The relative file path - */ - private function getRelativePath($domain, $locale) - { - return strtr($this->relativePathTemplate, array( - '%domain%' => $domain, - '%locale%' => $locale, - '%extension%' => $this->getExtension(), - )); - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php deleted file mode 100644 index 0a2ed9f..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IcuResFileDumper.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class IcuResFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - protected $relativePathTemplate = '%domain%/%locale%.%extension%'; - - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - $data = $indexes = $resources = ''; - - foreach ($messages->all($domain) as $source => $target) { - $indexes .= pack('v', strlen($data) + 28); - $data .= $source."\0"; - } - - $data .= $this->writePadding($data); - - $keyTop = $this->getPosition($data); - - foreach ($messages->all($domain) as $source => $target) { - $resources .= pack('V', $this->getPosition($data)); - - $data .= pack('V', strlen($target)) - .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') - .$this->writePadding($data) - ; - } - - $resOffset = $this->getPosition($data); - - $data .= pack('v', count($messages)) - .$indexes - .$this->writePadding($data) - .$resources - ; - - $bundleTop = $this->getPosition($data); - - $root = pack('V7', - $resOffset + (2 << 28), // Resource Offset + Resource Type - 6, // Index length - $keyTop, // Index keys top - $bundleTop, // Index resources top - $bundleTop, // Index bundle top - count($messages), // Index max table length - 0 // Index attributes - ); - - $header = pack('vC2v4C12@32', - 32, // Header size - 0xDA, 0x27, // Magic number 1 and 2 - 20, 0, 0, 2, // Rest of the header, ..., Size of a char - 0x52, 0x65, 0x73, 0x42, // Data format identifier - 1, 2, 0, 0, // Data version - 1, 4, 0, 0 // Unicode version - ); - - $output = $header - .$root - .$data; - - return $output; - } - - private function writePadding($data) - { - $padding = strlen($data) % 4; - - if ($padding) { - return str_repeat("\xAA", 4 - $padding); - } - } - - private function getPosition($data) - { - $position = (strlen($data) + 28) / 4; - - return $position; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'res'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php deleted file mode 100644 index 45df389..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/IniFileDumper.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IniFileDumper generates an ini formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class IniFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - $output = ''; - - foreach ($messages->all($domain) as $source => $target) { - $escapeTarget = str_replace('"', '\"', $target); - $output .= $source.'="'.$escapeTarget."\"\n"; - } - - return $output; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'ini'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/JsonFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/JsonFileDumper.php deleted file mode 100644 index fea7827..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/JsonFileDumper.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -if (!defined('JSON_PRETTY_PRINT')) { - define('JSON_PRETTY_PRINT', 128); -} - -/** - * JsonFileDumper generates an json formatted string representation of a message catalogue. - * - * @author singles - */ -class JsonFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - return json_encode($messages->all($domain), JSON_PRETTY_PRINT); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'json'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php deleted file mode 100644 index f8dc6ac..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/MoFileDumper.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Loader\MoFileLoader; - -/** - * MoFileDumper generates a gettext formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class MoFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - $output = $sources = $targets = $sourceOffsets = $targetOffsets = ''; - $offsets = array(); - $size = 0; - - foreach ($messages->all($domain) as $source => $target) { - $offsets[] = array_map('strlen', array($sources, $source, $targets, $target)); - $sources .= "\0".$source; - $targets .= "\0".$target; - ++$size; - } - - $header = array( - 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, - 'formatRevision' => 0, - 'count' => $size, - 'offsetId' => MoFileLoader::MO_HEADER_SIZE, - 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), - 'sizeHashes' => 0, - 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), - ); - - $sourcesSize = strlen($sources); - $sourcesStart = $header['offsetHashes'] + 1; - - foreach ($offsets as $offset) { - $sourceOffsets .= $this->writeLong($offset[1]) - .$this->writeLong($offset[0] + $sourcesStart); - $targetOffsets .= $this->writeLong($offset[3]) - .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); - } - - $output = implode(array_map(array($this, 'writeLong'), $header)) - .$sourceOffsets - .$targetOffsets - .$sources - .$targets - ; - - return $output; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'mo'; - } - - private function writeLong($str) - { - return pack('V*', $str); - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php deleted file mode 100644 index b354c12..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PhpFileDumper.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * PhpFileDumper generates PHP files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -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'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php deleted file mode 100644 index 983064b..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/PoFileDumper.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * PoFileDumper generates a gettext formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class PoFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain = 'messages') - { - $output = 'msgid ""'."\n"; - $output .= 'msgstr ""'."\n"; - $output .= '"Content-Type: text/plain; charset=UTF-8\n"'."\n"; - $output .= '"Content-Transfer-Encoding: 8bit\n"'."\n"; - $output .= '"Language: '.$messages->getLocale().'\n"'."\n"; - $output .= "\n"; - - $newLine = false; - foreach ($messages->all($domain) as $source => $target) { - if ($newLine) { - $output .= "\n"; - } else { - $newLine = true; - } - $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); - $output .= sprintf('msgstr "%s"', $this->escape($target)); - } - - return $output; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'po'; - } - - private function escape($str) - { - return addcslashes($str, "\0..\37\42\134"); - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php deleted file mode 100644 index 42aa093..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/QtFileDumper.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * QtFileDumper generates ts files from a message catalogue. - * - * @author Benjamin Eberlei <kontakt@beberlei.de> - */ -class QtFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function format(MessageCatalogue $messages, $domain) - { - $dom = new \DOMDocument('1.0', 'utf-8'); - $dom->formatOutput = true; - $ts = $dom->appendChild($dom->createElement('TS')); - $context = $ts->appendChild($dom->createElement('context')); - $context->appendChild($dom->createElement('name', $domain)); - - foreach ($messages->all($domain) as $source => $target) { - $message = $context->appendChild($dom->createElement('message')); - $message->appendChild($dom->createElement('source', $source)); - $message->appendChild($dom->createElement('translation', $target)); - } - - return $dom->saveXML(); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'ts'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php deleted file mode 100644 index 58d1973..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/XliffFileDumper.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * XliffFileDumper generates xliff files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class XliffFileDumper extends FileDumper -{ - /** - * @var string - */ - private $defaultLocale; - - /** - * {@inheritdoc} - */ - public function dump(MessageCatalogue $messages, $options = array()) - { - if (array_key_exists('default_locale', $options)) { - $this->defaultLocale = $options['default_locale']; - } else { - $this->defaultLocale = \Locale::getDefault(); - } - - parent::dump($messages, $options); - } - - /** - * {@inheritdoc} - */ - protected function format(MessageCatalogue $messages, $domain) - { - $dom = new \DOMDocument('1.0', 'utf-8'); - $dom->formatOutput = true; - - $xliff = $dom->appendChild($dom->createElement('xliff')); - $xliff->setAttribute('version', '1.2'); - $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'); - - $xliffFile = $xliff->appendChild($dom->createElement('file')); - $xliffFile->setAttribute('source-language', str_replace('_', '-', $this->defaultLocale)); - $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); - $xliffFile->setAttribute('datatype', 'plaintext'); - $xliffFile->setAttribute('original', 'file.ext'); - - $xliffBody = $xliffFile->appendChild($dom->createElement('body')); - foreach ($messages->all($domain) as $source => $target) { - $translation = $dom->createElement('trans-unit'); - - $translation->setAttribute('id', md5($source)); - $translation->setAttribute('resname', $source); - - $s = $translation->appendChild($dom->createElement('source')); - $s->appendChild($dom->createTextNode($source)); - - // Does the target contain characters requiring a CDATA section? - $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); - - $t = $translation->appendChild($dom->createElement('target')); - $t->appendChild($text); - - $metadata = $messages->getMetadata($source, $domain); - if (null !== $metadata && array_key_exists('notes', $metadata) && is_array($metadata['notes'])) { - foreach ($metadata['notes'] as $note) { - if (!isset($note['content'])) { - continue; - } - - $n = $translation->appendChild($dom->createElement('note')); - $n->appendChild($dom->createTextNode($note['content'])); - - if (isset($note['priority'])) { - $n->setAttribute('priority', $note['priority']); - } - - if (isset($note['from'])) { - $n->setAttribute('from', $note['from']); - } - } - } - - $xliffBody->appendChild($translation); - } - - return $dom->saveXML(); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'xlf'; - } -} diff --git a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php b/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php deleted file mode 100644 index 5920fef..0000000 --- a/Aufgabe06/vendor/symfony/translation/Symfony/Component/Translation/Dumper/YamlFileDumper.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileDumper generates yaml files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class YamlFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - protected function format(MessageCatalogue $messages, $domain) - { - return Yaml::dump($messages->all($domain)); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'yml'; - } -} |
