Re: Issues with Event_Dispatcher

From: Date: Wed, 13 Apr 2005 05:06:33 +0000
Subject: Re: Issues with Event_Dispatcher
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18716@lists.php.net to get a copy of this message
Ok some interesting news. if i want to use one class to handle all events i must do this Logout { function Logout($notification) { switch ($notification->getNotificationName()) { case 'onLogin': $this->onLogin(); break; case 'onLogout': $this->onLogout(); break; } } } $dispatcher->addObserver(array('Logout','Logout')); defeats the purpose of this right ?

« previous php.pear.general (#18716) next »