[imp] accessing $notify from within a hook

Chuck Hagenbuch chuck at horde.org
Fri Jan 5 13:26:16 PST 2007


Quoting Liam Hoekenga <liamr at deathstar.org>:

> That said... is one approach better than the other?   
> $GLOBALS['notification']  or the singleton?

I would only use the singleton if you're operating in a context where  
an app's lib/base.php might not have been loaded already. Unlikely for  
hooks. Also, it's a bit more complicated since you need to attach at  
least the status listener to the notification stack.

-chuck

-- 
"we are plastered to the windshield of the bus that is time." - Chris


More information about the imp mailing list