PHP Classes

Multi Singleton: Implementation of the singleton design pattern

Recommend this page to a friend!
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 745 All time: 4,500 This week: 206Up
Version License PHP version Categories
multi-singleton 1.0GNU General Publi...5.3.0PHP 5, Design Patterns


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
  Performance   Level  
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: United States United States
Age: ???
All time rank: 65986 in United States United States
Week rank: 311 Up38 in United States United States Up
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  
This week:0
All time:4,500
This week:206Up