Re: Database/singleton/functions
Reply #2 –
makes sense (and no, I'm not a php expert).
Re: Database/singleton/functions
Reply #4 –
Yep, because in fact it is not a singleton.
The main reason I was thinking at this is because of the fact that almost any method of the class has a parameter you can use to override the connection (except it works only for mysql), but in that case you have to initiate the new connection all by yourself, because otherwise, using initiate, the class is "re-initialized" completely and all the old connection data are wiped out.
Instead, with this method, you should be able to re-instantiate the class with another connection without touching the current one...I think.