SchemaLocator.php 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Ui\Config\Reader;
  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 config (per-file)
  16. *
  17. * @var string
  18. */
  19. private $perFileSchema;
  20. /**
  21. * @param Reader $moduleReader
  22. */
  23. public function __construct(Reader $moduleReader)
  24. {
  25. $this->perFileSchema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Ui')
  26. . '/' . 'ui_configuration.xsd';
  27. }
  28. /**
  29. * @inheritdoc
  30. */
  31. public function getSchema()
  32. {
  33. return null;
  34. }
  35. /**
  36. * @inheritdoc
  37. */
  38. public function getPerFileSchema()
  39. {
  40. return $this->perFileSchema;
  41. }
  42. }