Re: Use of Event_Dispatcher package

From: Date: Mon, 28 Feb 2005 18:52:34 +0000
Subject: Re: Use of Event_Dispatcher package
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36423@lists.php.net to get a copy of this message
Hi, Philippe Jausions schrieb:
1. Event_Dispatcher doesn't seem to have a built-in notification for addObserver and so on... What keeps you from doing something like:
File_Monitor_Event_Dispatcher extends Event_Dispatcher { function addObserver(...) {
    $this->post($this, 'ObserverAdded');
    parent::addObserver(...);
} } Triggering notifications for every observer added certainly is not a feature I'd like to include in Event_Observer directly, as it can be easily wrapped in a new class...
2. FAM supports more features such as Suspend/Resume, event pull. I'm not familiar with the fam extension, but if I unterstand it correctly there is no real event management as you pull all events from a stack. Just transform those to Event_Dispatcher notifications....
Just my 2 cts, Stephan -- http://www.php-tools.net http://www.schst.net http://pear.php.net

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