PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
  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 (4 years ago) RSS 2.0 feedStarStarStar 52%Total: 556 All time: 5,197 This week: 899Up
Version License PHP version Categories
singleton-multiton 1.0GNU Lesser Genera...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
  Performance   Level  
Name: Andrei Alexandru <contact>
Classes: 3 packages by
Country: Spain Spain
Age: 30
All time rank: 255565 in Spain Spain
Week rank: 764 Up22 in Spain Spain Up
Innovation award
Innovation award
Nominee: 2x

Winner: 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:556
This week:0
All time:5,197
This week:899Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:1844