Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/translation/Writer/TranslationWriter.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
line wrap: on
line diff
--- a/vendor/symfony/translation/Writer/TranslationWriter.php Mon Apr 23 09:33:26 2018 +0100 +++ b/vendor/symfony/translation/Writer/TranslationWriter.php Mon Apr 23 09:46:53 2018 +0100 @@ -21,13 +21,8 @@ * * @author Michel Salib <michelsalib@hotmail.com> */ -class TranslationWriter +class TranslationWriter implements TranslationWriterInterface { - /** - * Dumpers used for export. - * - * @var array - */ private $dumpers = array(); /** @@ -66,13 +61,13 @@ /** * Writes translation from the catalogue according to the selected format. * - * @param MessageCatalogue $catalogue The message catalogue to dump + * @param MessageCatalogue $catalogue The message catalogue to write * @param string $format The format to use to dump the messages * @param array $options Options that are passed to the dumper * * @throws InvalidArgumentException */ - public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + public function write(MessageCatalogue $catalogue, $format, $options = array()) { if (!isset($this->dumpers[$format])) { throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); @@ -88,4 +83,21 @@ // save $dumper->dump($catalogue, $options); } + + /** + * Writes translation from the catalogue according to the selected format. + * + * @param MessageCatalogue $catalogue The message catalogue to write + * @param string $format The format to use to dump the messages + * @param array $options Options that are passed to the dumper + * + * @throws InvalidArgumentException + * + * @deprecated since 3.4 will be removed in 4.0. Use write instead. + */ + public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + { + @trigger_error(sprintf('Method %s() is deprecated since Symfony 3.4 and will be removed in 4.0. Use write() instead.', __METHOD__), E_USER_DEPRECATED); + $this->write($catalogue, $format, $options); + } }