PHP Classes

Simple Singleton: Create singleton objects

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: 362 All time: 6,893 This week: 560Up
Version License PHP version Categories
simple-singleton 1.0GNU General Publi...5PHP 5, Design Patterns
Description 

Author

This is a simple class that can be used to create singleton objects.

When requested, it can create an instance of the class itself and store it as static variable.

If the class object was already created and stored in the static variable, the class returns that object.

Picture of freedelta
Name: freedelta <contact>
Classes: 3 packages by
Country: France France
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file license.txt Lic. GNU GENERAL PUBLIC LICENSE
Accessible without login Plain text file simplesingleton-example.php Example Class sample use
Plain text file SimpleSingleton.class.php Class Singleton code

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:362
This week:0
All time:6,893
This week:560Up