Your IP : 127.0.0.1
<?php
/**
* @copyright: Copyright © 2017 Firebear Studio. All rights reserved.
* @author : Firebear Studio <fbeardev@gmail.com>
*/
namespace Firebear\ImportExport\Model\Source\Config;
use Magento\Framework\Config\SchemaLocatorInterface;
/**
* Class SchemaLocator
*
* @package Firebear\ImportExport\Model\Source\Config
*/
class SchemaLocator implements SchemaLocatorInterface
{
/**
* Path to corresponding XSD file with validation rules for merged config
*
* @var string
*/
protected $schema = null;
/**
* Path to corresponding XSD file with validation rules for separate config files
*
* @var string
*/
protected $perFileSchema = null;
/**
* SchemaLocator constructor.
* @param \Magento\Framework\Module\Dir\Reader $moduleReader
*/
public function __construct(
\Magento\Framework\Module\Dir\Reader $moduleReader
) {
$etcDir = $moduleReader->getModuleDir('etc', 'Firebear_ImportExport');
$this->schema = $etcDir . '/source_types.xsd';
$this->perFileSchema = $etcDir . '/source_types.xsd';
}
/**
* Get path to merged config schema
*
* @return string
*/
public function getSchema()
{
return $this->schema;
}
/**
* Get path to pre file validation schema
*
* @return string
*/
public function getPerFileSchema()
{
return $this->perFileSchema;
}
}