ResolverInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Locale;
  7. /**
  8. * Manages locale config information
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface ResolverInterface
  14. {
  15. /**
  16. * Return path to default locale
  17. *
  18. * @return string
  19. */
  20. public function getDefaultLocalePath();
  21. /**
  22. * Set default locale code
  23. *
  24. * @param string $locale
  25. * @return self
  26. */
  27. public function setDefaultLocale($locale);
  28. /**
  29. * Retrieve default locale code
  30. *
  31. * @return string
  32. */
  33. public function getDefaultLocale();
  34. /**
  35. * Set locale
  36. *
  37. * @param string $locale
  38. * @return self
  39. */
  40. public function setLocale($locale = null);
  41. /**
  42. * Retrieve locale
  43. *
  44. * @return string
  45. */
  46. public function getLocale();
  47. /**
  48. * Push current locale to stack and replace with locale from specified scope
  49. *
  50. * @param int $scopeId
  51. * @return string|null
  52. */
  53. public function emulate($scopeId);
  54. /**
  55. * Get last locale, used before last emulation
  56. *
  57. * @return string|null
  58. */
  59. public function revert();
  60. }