LoaderInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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\Loader;
  11. use Symfony\Component\Translation\MessageCatalogue;
  12. use Symfony\Component\Translation\Exception\InvalidResourceException;
  13. /**
  14. * LoaderInterface is the interface implemented by all translation loaders.
  15. *
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. *
  18. * @api
  19. */
  20. interface LoaderInterface
  21. {
  22. /**
  23. * Loads a locale.
  24. *
  25. * @param mixed $resource A resource
  26. * @param string $locale A locale
  27. * @param string $domain The domain
  28. *
  29. * @return MessageCatalogue A MessageCatalogue instance
  30. *
  31. * @api
  32. *
  33. * @throws NotFoundResourceException when the resource cannot be found
  34. * @throws InvalidResourceException when the resource cannot be loaded
  35. */
  36. public function load($resource, $locale, $domain = 'messages');
  37. }