ProviderInterface.php 927 B

123456789101112131415161718192021222324252627282930
  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\Provider;
  11. use Symfony\Component\Translation\TranslatorBag;
  12. use Symfony\Component\Translation\TranslatorBagInterface;
  13. interface ProviderInterface extends \Stringable
  14. {
  15. /**
  16. * Translations available in the TranslatorBag only must be created.
  17. * Translations available in both the TranslatorBag and on the provider
  18. * must be overwritten.
  19. * Translations available on the provider only must be kept.
  20. */
  21. public function write(TranslatorBagInterface $translatorBag): void;
  22. public function read(array $domains, array $locales): TranslatorBag;
  23. public function delete(TranslatorBagInterface $translatorBag): void;
  24. }