euantorano/MyAlerts — pull request #89 by JN-Jones (2014-11-29 12:05:26+00:00)
Title: Make the massager using singleton and remove all uses of $GLOBALS

I've added two static functions to the manager classes: `createInstance` which has the same parameters as the constructor has and creates the instance (if none has been so far) and returns it and `getInstance` which returns either the instance or false if none was created so far.
Also renamed `myalerts_initialise_global_objects` to `myalerts_create_instances` where `createInstance` is called for all manager classes. Added the function also to the first hook in the acp to load the functions there.
Finally I've replaced all calls to the globalised classes with calls to the corresponding `getInstance` function.