Re: [PEPr] +1 for Event::Dispatcher

From: Date: Sat, 15 Jan 2005 11:54:20 +0000
Subject: Re: [PEPr] +1 for Event::Dispatcher
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35502@lists.php.net to get a copy of this message
Stephan Schmidt wrote: >Bertrand Mansion schrieb: >> Looks like my version got on steroids ! >> So far, I agree your changes make the class even more interesting. >Great that you like the changes. OK, I have updated the online version: - fixed a bug with pending notifications (they don't need to be posted again to global observers), - changed properties and methods name in the Notification object so that there is little chance they collide if the class is extended, - removed _postPending() (got integrated in addObserver() as per Laurent's request) - integrated most of Stephan's improvements (cancel a notification, get notification count, nested dispatchers) - updated my local tests (not yet available to public) TODO: - test cases for Stephan's code will have to be done. - PHP4 checks with call_user_func($callback, $notification) and references. This might need to be changed to $object->$method($notification) and $class::$method($notification) if the reference is lost in the first case or maybe the better solution would be to use call_user_func_array($callback, array(&$notification)); Now, please vote :) Bertrand

« previous php.pear.dev (#35502) next »