WebsiteRepositoryInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. /**
  9. * Website repository interface
  10. *
  11. * @api
  12. * @since 100.0.2
  13. */
  14. interface WebsiteRepositoryInterface
  15. {
  16. /**
  17. * Retrieve website by code
  18. *
  19. * @param string $code
  20. * @return \Magento\Store\Api\Data\WebsiteInterface
  21. * @throws NoSuchEntityException
  22. */
  23. public function get($code);
  24. /**
  25. * Retrieve website by id
  26. *
  27. * @param int $id
  28. * @return \Magento\Store\Api\Data\WebsiteInterface
  29. * @throws NoSuchEntityException
  30. */
  31. public function getById($id);
  32. /**
  33. * Retrieve list of all websites
  34. *
  35. * @return \Magento\Store\Api\Data\WebsiteInterface[]
  36. */
  37. public function getList();
  38. /**
  39. * Retrieve default website
  40. *
  41. * @return \Magento\Store\Api\Data\WebsiteInterface
  42. * @throws \DomainException
  43. */
  44. public function getDefault();
  45. /**
  46. * Clear cached entities
  47. *
  48. * @return void
  49. */
  50. public function clean();
  51. }