Login   Register  
PHP Classes
elePHPant
Icontem

Multi Singleton: Implementation of the singleton design pattern

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2009-12-10 (4 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 727 All time: 4,167 This week: 1,457Up
Version License PHP version Categories  
multi-singleton 1.0GNU General Public Lice...5.3.0PHP 5, Design Patterns
Description Author  

This class implements the singleton design pattern.

It provides an interface that has a constructor function that once called stored objects of each singleton class in static array class variable.

This way the objects of a singleton class are only instantiated once.

Innovation Award  
PHP Programming Innovation award nominee
November 2009
Number 5


Prize: One copy of the Zend Studio
Singleton is a design pattern that assures that only one instance of an object is created.

Usually, each class defines its own implementation of the singleton design pattern.

This class can manage singletons of multiple classes.

Manuel Lemos
Picture of Sebastian Potasiak
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: Poland Poland
Age: 21
All time rank: 62417 in Poland Poland
Week rank: 1677 Down47 in Poland Poland Down
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files  
File Role Description
Plain text file Singleton.php Class Class file
Plain text file ISingleton.php Class Interface file
Accessible without login Plain text file MyClass.php Example Example class
Accessible without login Plain text file example.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 0%Total:727All time:4,167
 This week:0This week:1,457Up