TranslationWriterInterface.php 968 B

1234567891011121314151617181920212223242526272829303132333435
  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. * @return void
  27. *
  28. * @throws InvalidArgumentException
  29. */
  30. public function write(MessageCatalogue $catalogue, string $format, array $options = []);
  31. }