StoreRepositoryInterface.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Store\Api;
  7. use Magento\Framework\Exception\NoSuchEntityException;
  8. use Magento\Store\Model\StoreIsInactiveException;
  9. /**
  10. * Store repository interface
  11. *
  12. * @api
  13. * @since 100.0.2
  14. */
  15. interface StoreRepositoryInterface
  16. {
  17. /**
  18. * Retrieve store by code
  19. *
  20. * @param string $code
  21. * @return \Magento\Store\Api\Data\StoreInterface
  22. * @throws NoSuchEntityException
  23. */
  24. public function get($code);
  25. /**
  26. * Retrieve active store by code
  27. *
  28. * @param string $code
  29. * @return \Magento\Store\Api\Data\StoreInterface
  30. * @throws NoSuchEntityException
  31. * @throws StoreIsInactiveException
  32. */
  33. public function getActiveStoreByCode($code);
  34. /**
  35. * Retrieve active store by id
  36. *
  37. * @param int $id
  38. * @return \Magento\Store\Api\Data\StoreInterface
  39. * @throws NoSuchEntityException
  40. * @throws StoreIsInactiveException
  41. */
  42. public function getActiveStoreById($id);
  43. /**
  44. * Retrieve store by id
  45. *
  46. * @param int $id
  47. * @return \Magento\Store\Api\Data\StoreInterface
  48. * @throws NoSuchEntityException
  49. */
  50. public function getById($id);
  51. /**
  52. * Retrieve list of all stores
  53. *
  54. * @return \Magento\Store\Api\Data\StoreInterface[]
  55. */
  56. public function getList();
  57. /**
  58. * Clear cached entities
  59. *
  60. * @return void
  61. */
  62. public function clean();
  63. }