Let’s see the class \Magento\Framework\Config\Reader\Filesystem
.
It has a constructor argument domDocumentClass
:
The default domDocumentClass
value is Magento\Framework\Config\Dom
.
It is used here:
Let’s try to change the Magento\Framework\Config\Dom
to a custom class for a particular \Magento\Framework\Config\Reader\Filesystem
descendant: Magento\Config\Model\Config\Structure\Reader
My dependency injection code:
<type name='Magento\Config\Model\Config\Structure\Reader'>
<arguments>
<argument name='domDocumentClass' xsi:type='string'>Df\Framework\Config\Dom</argument>
</arguments>
</type>
See http://devdocs.magento.com/guides/v2.0/extension-dev-guide/depend-inj.html#dep-inj-preview-cons