123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- /**
- * Locator for page layouts XSD schemas.
- *
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Theme\Model\Layout\Config;
- use Magento\Framework\Config\Dom\UrnResolver;
- class SchemaLocator implements \Magento\Framework\Config\SchemaLocatorInterface
- {
- /**
- * Path to corresponding XSD file with validation rules for merged config
- *
- * @var string
- */
- protected $_schema;
- /**
- * @param UrnResolver $urnResolver
- */
- public function __construct(UrnResolver $urnResolver)
- {
- $this->_schema = $urnResolver->getRealPath('urn:magento:framework:View/PageLayout/etc/layouts.xsd');
- }
- /**
- * Get path to merged config schema
- *
- * @return string|null
- */
- public function getSchema()
- {
- return $this->_schema;
- }
- /**
- * Get path to per file validation schema
- *
- * @return string|null
- */
- public function getPerFileSchema()
- {
- return $this->_schema;
- }
- }
|