BundleReaderInterface.php 1021 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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\Intl\ResourceBundle\Reader;
  11. /**
  12. * Reads resource bundle files.
  13. *
  14. * @author Bernhard Schussek <bschussek@gmail.com>
  15. */
  16. interface BundleReaderInterface
  17. {
  18. /**
  19. * Reads a resource bundle.
  20. *
  21. * @param string $path The path to the resource bundle.
  22. * @param string $locale The locale to read.
  23. *
  24. * @return mixed Returns an array or {@link \ArrayAccess} instance for
  25. * complex data, a scalar value otherwise.
  26. */
  27. public function read($path, $locale);
  28. /**
  29. * Reads the available locales of a resource bundle.
  30. *
  31. * @param string $path The path to the resource bundle.
  32. *
  33. * @return string[] A list of supported locale codes.
  34. */
  35. public function getLocales($path);
  36. }