Config.php 763 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Mview;
  7. class Config implements ConfigInterface
  8. {
  9. /**
  10. * @var Config\Data
  11. */
  12. protected $configData;
  13. /**
  14. * @param Config\Data $configData
  15. */
  16. public function __construct(Config\Data $configData)
  17. {
  18. $this->configData = $configData;
  19. }
  20. /**
  21. * Get views list
  22. *
  23. * @return array[]
  24. */
  25. public function getViews()
  26. {
  27. return $this->configData->get();
  28. }
  29. /**
  30. * Get view by ID
  31. *
  32. * @param string $viewId
  33. * @return array
  34. */
  35. public function getView($viewId)
  36. {
  37. return $this->configData->get($viewId);
  38. }
  39. }