SchemaLocator.php 956 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Config\Reader\DefinitionMap;
  7. use Magento\Framework\Module\Dir;
  8. use Magento\Framework\Module\Dir\Reader;
  9. /**
  10. * Config schema locator interface
  11. */
  12. class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
  13. {
  14. /**
  15. * Path to corresponding XSD file with validation rules for merged config
  16. *
  17. * @var string
  18. */
  19. private $schema;
  20. /**
  21. * @param Reader $moduleReader
  22. */
  23. public function __construct(Reader $moduleReader)
  24. {
  25. $this->schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Ui') . '/' . 'ui_definition.map.xsd';
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function getSchema()
  31. {
  32. return $this->schema;
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function getPerFileSchema()
  38. {
  39. return null;
  40. }
  41. }