Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

what is singleton ?? 
 
number25
Member
 
Total Posts:  64
Joined:  2008-07-12
 

I notice some magento methods has a ‘getsingleton()’. What is the definition for a singleton and what does it do ??

 
Magento Community Magento Community
Magento Community
Magento Community
 
battosai
Jr. Member
 
Total Posts:  13
Joined:  2008-01-21
 

A singleton is a software design pattern that allows an object to be created only once.  For instance, suppose you have some object that demands a lot of resources, and many requests to create it would be “expensive.” A singleton pattern says the object may only have one instantiation, and all requests for that object will use the same copy.

As for the Magento-specific information, perhaps someone else can answer that.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top