[imp] accessing $notify from within a hook

Chuck Hagenbuch chuck at horde.org
Fri Jan 5 12:10:38 PST 2007


Quoting Michael M Slusarz <slusarz at horde.org>:

> This is what singletons are for.  So this should work now (and forever):
>
> $notify = &Notification::singleton();
> $notify->push(_("this is a notice"), 'horde.message');

This isn't actually true in this case, because the notification object  
potentially has to have listeners attached to it, which may or may not  
have been done (the singleton here turns out not to guarantee the  
right things, I guess).

And there still aren't guarantees about Horde 4 and beyond, so not  
necessarily forever. :)

-chuck

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


More information about the imp mailing list