Magento
M70-201 · Question #73
The initial call to _______________ will create and return an instance of the specified class. Subsequent calls to this method during the same execution cycle will return the same class instance as…
The correct answer is D. Mage::getSingleton('modulename/modelname'). See the full explanation below for the reasoning.
Question
The initial call to _______________ will create and return an instance of the specified class. Subsequent calls to this method during the same execution cycle will return the same class instance as opposed to creating a new one.
Options
- AMage: :getResourceModel('namespace/modulename');
- BMage:: get Instance ('name space/modulename');
- CMage: :getModel( 'modulename/modelname') ;
- DMage::getSingleton('modulename/modelname');
How the community answered
(35 responses)- A14% (5)
- B3% (1)
- C9% (3)
- D74% (26)
Community Discussion
No community discussion yet for this question.