Thread: New approach
View Single Post
Old 05-09-2008, 10:21 AM   #19 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Evulness, I recommend you change the following line in your getInst method:

PHP Code:
self::$m_pInst = new EvulDB(); 
to:

PHP Code:
self::$m_pInst = new self(); 
That way, when extending the base class, you won't need to reimplement the getInst() method (in the actual form, it would return an instance of the EvulDB class, even if you are in an subclass of it, therefore causing a bug in your application).
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
The Following User Says Thank You to xenon For This Useful Post:
Evulness (05-09-2008)