You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct Class Name Rewrite Support
The new feature of rewriting classes by direct class name was added in Magento 2.
The implementation involved two steps:
A new Mage_Core_Model_Config::applyClassRewrites($className) method was introduced. This method receives a direct class name, checks Magento config for rewrites, and returns either the original class name or the name of the rewriting class.
The new rewrites location is now checked in the config file in the /global/rewrites node. The nodes inside that container match rewritten classes to their rewrites.
For example, to instruct Magento to create an object of the class My_Module_Model_Url whenever Mage_Core_Model_Url is requested:
But in the Mage_Core_Model_Config, there is no applyClassRewrites method.
The text was updated successfully, but these errors were encountered:
In the document:
Direct Class Name Rewrite Support
The new feature of rewriting classes by direct class name was added in Magento 2.
The implementation involved two steps:
A new Mage_Core_Model_Config::applyClassRewrites($className) method was introduced. This method receives a direct class name, checks Magento config for rewrites, and returns either the original class name or the name of the rewriting class.
The new rewrites location is now checked in the config file in the /global/rewrites node. The nodes inside that container match rewritten classes to their rewrites.
For example, to instruct Magento to create an object of the class My_Module_Model_Url whenever Mage_Core_Model_Url is requested:
But in the Mage_Core_Model_Config, there is no applyClassRewrites method.
The text was updated successfully, but these errors were encountered: