NullProvider.php 910 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. /**
  14. * @author Mathieu Santostefano <msantostefano@protonmail.com>
  15. */
  16. class NullProvider implements ProviderInterface
  17. {
  18. public function __toString(): string
  19. {
  20. return 'null';
  21. }
  22. public function write(TranslatorBagInterface $translatorBag, bool $override = false): void
  23. {
  24. }
  25. public function read(array $domains, array $locales): TranslatorBag
  26. {
  27. return new TranslatorBag();
  28. }
  29. public function delete(TranslatorBagInterface $translatorBag): void
  30. {
  31. }
  32. }