01-11-2010, 01:59 PM
|
#19 (permalink)
|
|
The Wanderer
Join Date: Jan 2010
Posts: 7
Thanks: 0
|
One thing that I usually do and, which in case of this example won't change anything is instead of instantiating the class with its classname I instantiate it with "self":
Instead of doing this:
PHP Code:
self::$m_pInstance = new Database();
I do this:
PHP Code:
self::$m_pInstance = new self();
Then you don't depend on the classname and if you ever change its name you don't have to also go through the code.
|
|
|
|