Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.0

Request #4927 get the list of observers already attached
Submitted: 2005-07-26 15:56 UTC Modified: 2005-09-22 10:39 UTC
From: farell Assigned: schst
Status: Closed Package: Event_Dispatcher
PHP Version: 4.3.10 OS: Windows XP
Roadmaps: (Not assigned)    

 [2005-07-26 15:56 UTC] farell
Description: ------------ With my implementation into HTML_Progress2, i've replaced my old one by the Event_Dispatcher, and try to keep old features. These ones are: - add/update an observer (it's possible with Event_Dispatcher 0.9.1) - remove an observer (it's possible with Event_Dispatcher 0.9.1) - retrieve the list of all observers currently attached to a dispatcher (it's not yet implemented in version 0.9.1) I expect by a such function ( probably call getObservers() ) retrieve the data(callback, class-filter) behind the $_ro (Registered observer callbacks). And why not, the notification class used ( default is Event_Notification ). But it could be overloaded by a custom one: see setNotificationClass() where there is again no reading interface. If it's not enough clear (sorry: my bad english), feel free to ask me again regards Laurent Laville


 [2005-07-26 17:15 UTC] bmansion at mamasam dot com
I am just repeating here what I told you privately before (in English this time :) ). You don't need to know who is listening to your notifications. Just post them and forget (Post & Forgetâ„¢), that's the way it works. So unless, you provide a good case example, I think your request will be ignored for now. Sorry.
 [2005-09-22 10:39 UTC] schst
As discussed on pear-dev, I added two new methods to CVS: - observerRegistered() - getObservers() However the second method will *not* return the actual observers, but an array of string representations.