I am using almost all time Mage:getModel
. But surprisingly i found somewhere about Mage:getModelInstance
.
Can you please tell me where to use Mage:getModelInstance
and what is the difference between these two ?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityThe main difference is that getModel
can be called from Mage
whereas getModelInstance
is a method from the Config
class only : https://github.com/OpenMage/magento-mirror/blob/d409dff20e992e97546568974399c456958299f9/app/code/core/Mage/Core/Model/Config.php#L1341
getModel
actually calls getModelInstance
so there is no reason for calling the second one