PHP Classes

Multi Singleton: Implementation of the singleton design pattern

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 745 All time: 4,503 This week: 206Up
Version License PHP version Categories
multi-singleton 1.0GNU General Publi...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
  Performance   Level  
Name: Sebastian Potasiak <contact>
Classes: 8 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 3x

  Files folder image Files (4)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:745
This week:0
All time:4,503
This week:206Up