SchemaLocator.php 929 B

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