getInstance()
comes from the Singleton pattern. You basically use this when you want to instantiate no more than one instance of a class.
jimyi
2009-09-19 19:59:59
getInstance()
comes from the Singleton pattern. You basically use this when you want to instantiate no more than one instance of a class.
Hi,
It's quite simple. Looks, a lot like Zend Framework thought?
Anyway, this implements the Singleton design pattern. It's forbidding the programmer to create more than one instance of the controller. So, is you access your controller from anywhere in your code, instead of creating a new FrontController or something like that you just ask to be given the One instance that as been previously created.
If no instance exist, it's creating one else it only return you the front controller wich as been previously created.
Hope this helps you!