SchemaLocator.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * Entity attribute configuration schema locator
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Eav\Model\Entity\Attribute\Config;
  9. use Magento\Framework\Module\Dir;
  10. class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
  11. {
  12. /**
  13. * Schema file
  14. *
  15. * @var string
  16. */
  17. protected $_schema;
  18. /**
  19. * @param \Magento\Framework\Module\Dir\Reader $moduleReader
  20. * @codeCoverageIgnore
  21. */
  22. public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader)
  23. {
  24. $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Eav') . '/eav_attributes.xsd';
  25. }
  26. /**
  27. * Get path to merged config schema
  28. *
  29. * @return string|null
  30. * @codeCoverageIgnore
  31. */
  32. public function getSchema()
  33. {
  34. return $this->_schema;
  35. }
  36. /**
  37. * Get path to per file validation schema
  38. *
  39. * @return string|null
  40. * @codeCoverageIgnore
  41. */
  42. public function getPerFileSchema()
  43. {
  44. return null;
  45. }
  46. }