use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Util\ArrayConverter;
use Symfony\Component\Yaml\Yaml;
+use Symfony\Component\Translation\Exception\LogicException;
/**
* YamlFileDumper generates yaml files from a message catalogue.
public function formatCatalogue(MessageCatalogue $messages, $domain, array $options = array())
{
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
- throw new \LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.');
+ throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.');
}
$data = $messages->all($domain);
return Yaml::dump($data);
}
- /**
- * {@inheritdoc}
- */
- protected function format(MessageCatalogue $messages, $domain)
- {
- @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use the formatCatalogue() method instead.', E_USER_DEPRECATED);
-
- return $this->formatCatalogue($messages, $domain);
- }
-
/**
* {@inheritdoc}
*/