On 03/07/12 14:34, Marc Delisle wrote:
Hi, I just made a suggestion to Thilina but I want to validate it with everyone.
I see a lot of $common_functions = PMA_CommonFunctions::getInstance()
inside many functions of the same library. If we know that this library is always called from one script, I believe it would be more efficient to do this instead, inside the functions:
global $common_functions;
and ensure that $common_functions has been defined in the global scope of the calling script.
Doesn't that defeat the purpose of having a singleton class?
Bye, Rouslan