Login   Register  
PHP Classes
elePHPant
Icontem

Simple Singleton and Multiton Class: Create and manage one or more singleton objects

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  
2012-02-09 (2 years ago) RSS 2.0 feedStarStarStar 46%Total: 540 All time: 5,052 This week: 1,516Up
Version License PHP version Categories  
singleton-multiton 1.0GNU Lesser General Publ...5.0PHP 5, Design Patterns
Description Author  

This package can be used to create and manage one or more singleton objects.

There is one class that can manage one singleton object, assuring that only one instance of the class is created.

Another class can manage multiple singleton objects which are distinguished by name.

Innovation Award  
PHP Programming Innovation award nominee
August 2010
Number 10
Singleton is a common design pattern used to assure that only one object of a given class is created within the lifetime of a running script.

Sometimes you need to manage multiple singletons for different classes. This package can be used to manage the creation of multiple singletons within the same script.

Manuel Lemos
Picture of Andrei Alexandru
Name: Andrei Alexandru <contact>
Classes: 2 packages by
Country: Spain Spain
Age: 28
All time rank: 260165 in Spain Spain
Week rank: 1794 Up54 in Spain Spain Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Accessible without login Plain text file multiton.class.php Class Multiton Implementation Class
Accessible without login Plain text file multiton.test.php Example Usage ot the multiton Class
Accessible without login Plain text file singleton.class.php Class Singleton Implementation Class
Accessible without login Plain text file singleton.test.php Example Usage ot the singleton Class

 Version Control Unique User Downloads Download Rankings  
 0%Total:540All time:5,052
 This week:0This week:1,516Up
 User Ratings  
 
 All time
Utility:66%StarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:58%StarStarStar
Tests:-
Videos:-
Overall:46%StarStarStar
Rank:1824