use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Dumper\DumperInterface;
+use Symfony\Component\Translation\Exception\InvalidArgumentException;
+use Symfony\Component\Translation\Exception\RuntimeException;
/**
* TranslationWriter writes translation messages.
* @param string $format The format to use to dump the messages
* @param array $options Options that are passed to the dumper
*
- * @throws \InvalidArgumentException
+ * @throws InvalidArgumentException
*/
public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array())
{
if (!isset($this->dumpers[$format])) {
- throw new \InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
+ throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format));
}
// get the right dumper
$dumper = $this->dumpers[$format];
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
- throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
+ throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
}
// save