TranslationWriterInterface.php 928 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Translation\Writer;
  11. use Symfony\Component\Translation\Exception\InvalidArgumentException;
  12. use Symfony\Component\Translation\MessageCatalogue;
  13. /**
  14. * TranslationWriter writes translation messages.
  15. *
  16. * @author Michel Salib <michelsalib@hotmail.com>
  17. */
  18. interface TranslationWriterInterface
  19. {
  20. /**
  21. * Writes translation from the catalogue according to the selected format.
  22. *
  23. * @param string $format The format to use to dump the messages
  24. * @param array $options Options that are passed to the dumper
  25. *
  26. * @throws InvalidArgumentException
  27. */
  28. public function write(MessageCatalogue $catalogue, $format, $options = []);
  29. }