Archive for April 19th, 2008

Design Patterns: Singleton

Saturday, April 19th, 2008

The singleton design pattern is a way of enforcing only one instance of an object. This is achieved by making 3 fairly simple steps to a class. Firstly making the constructor private, creating a static member variable that will contain the instance and then creating a static method for accessing the instance.
So, In PHP it [...]