SchemaLocator.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Integration\Model\Config;
  7. use Magento\Framework\Module\Dir;
  8. /**
  9. * Integration config schema locator.
  10. *
  11. * @deprecated 100.1.0
  12. */
  13. class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
  14. {
  15. /**
  16. * Path to corresponding XSD file with validation rules for merged config
  17. *
  18. * @var string
  19. */
  20. protected $_schema = null;
  21. /**
  22. * Path to corresponding XSD file with validation rules for separate config files
  23. *
  24. * @var string
  25. */
  26. protected $_perFileSchema = null;
  27. /**
  28. * @param \Magento\Framework\Module\Dir\Reader $moduleReader
  29. */
  30. public function __construct(\Magento\Framework\Module\Dir\Reader $moduleReader)
  31. {
  32. $this->_schema = $moduleReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Integration')
  33. . '/integration/config.xsd';
  34. }
  35. /**
  36. * Get path to merged config schema
  37. *
  38. * @return string|null
  39. */
  40. public function getSchema()
  41. {
  42. return $this->_schema;
  43. }
  44. /**
  45. * Get path to per file validation schema
  46. *
  47. * @return string|null
  48. */
  49. public function getPerFileSchema()
  50. {
  51. return $this->_perFileSchema;
  52. }
  53. }