Author: Manuel Lemos
Package: TonTon PHP Singleton Trait New Generation
Multiton is a variant of the singleton design pattern that allows more than one instance of a class to exist up to a given limit.
This package provides a solution to implement singleton or multiton classes that can have its variable values be saved to a MemCached container, so the objects can be loaded with the same class values in other times that a script is run after the original script that has set the class variable has ended.
About the TonTon PHP Singleton Trait New Generation Package
The basic purpose is: Create class objects in a limited number of times
Here follows in more detail what it does:
This package allows to create class objects in a limited number of times.
It provides several trait that can be used with any classes to implement singletons or multitons to limit the number of times that an object of the same class can be created.
Currently it provides traits that can:
- Allow to create a class object only once
- Allow to create class objects a limited number of times up to a given limit number using a key value to distinguish each kind of class object
- Cache the values of the class variables in MemCached based storage
- Allow to create a single class object, only if constraints are met
This package was considered notable for implementing its benefits in a way that is worth noticing.
Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.
If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package as well nice prizes.
One nice prize that many PHP developers want and you may like is the PHP elePHPant mascot plush.
You need to be a registered user or login to post a comment
1,596,665 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
No comments were submitted yet.