|
Helping ordinary people create extraordinary websites! |
The Singleton Design Pattern for PHPBy Tony Marston2005-07-29
A separate Helper method within each class This method requires the addition of a function getInstance () It is referenced with code similar to the following: require_once 'std.datevalidation.class.inc'; This method has the following advantages:
This method has the following disadvantages:
Tutorial Pages: » Introduction » A non-class Helper function » A separate Helper method within each class » A single Helper method for all classes » References » Conclusion |
|