Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Dom.php
Go to the documentation of this file.
1 <?php
7 
8 class Dom extends \Magento\Framework\Config\Reader\Filesystem
9 {
13  const TYPE_ATTRIBUTE = 'xsi:type';
14 
18  protected $_idAttributes = [
19  '/config/preference' => 'for',
20  '/config/(type|virtualType)' => 'name',
21  '/config/(type|virtualType)/plugin' => 'name',
22  '/config/(type|virtualType)/arguments/argument' => 'name',
23  '/config/(type|virtualType)/arguments/argument(/item)+' => 'name',
24  ];
25 
36  public function __construct(
37  \Magento\Framework\Config\FileResolverInterface $fileResolver,
38  \Magento\Framework\ObjectManager\Config\Mapper\Dom $converter,
39  \Magento\Framework\ObjectManager\Config\SchemaLocator $schemaLocator,
40  \Magento\Framework\Config\ValidationStateInterface $validationState,
41  $fileName = 'di.xml',
42  $idAttributes = [],
43  $domDocumentClass = \Magento\Framework\Config\Dom::class,
44  $defaultScope = 'global'
45  ) {
46  parent::__construct(
47  $fileResolver,
48  $converter,
49  $schemaLocator,
51  $fileName,
52  $idAttributes,
53  $domDocumentClass,
54  $defaultScope
55  );
56  }
57 
63  protected function _createConfigMerger($mergerClass, $initialContents)
64  {
65  return new $mergerClass(
66  $initialContents,
67  $this->validationState,
68  $this->_idAttributes,
69  self::TYPE_ATTRIBUTE,
70  $this->_perFileSchema
71  );
72  }
73 }
__construct(\Magento\Framework\Config\FileResolverInterface $fileResolver, \Magento\Framework\ObjectManager\Config\Mapper\Dom $converter, \Magento\Framework\ObjectManager\Config\SchemaLocator $schemaLocator, \Magento\Framework\Config\ValidationStateInterface $validationState, $fileName='di.xml', $idAttributes=[], $domDocumentClass=\Magento\Framework\Config\Dom::class, $defaultScope='global')
Definition: Dom.php:36
$fileName
Definition: translate.phtml:15
_createConfigMerger($mergerClass, $initialContents)
Definition: Dom.php:63