|
Helping ordinary people create extraordinary websites! |
The Singleton Design Pattern for PHPBy Tony Marston2005-07-29
A non-class Helper function This method uses a separate non-class function as a "helper". It contains code similar to the following: function getDateObject () It is referenced with code similar to the following: $dateobj = getDateObject(); 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 |
|