Re: Issues with Event_Dispatcher
| From: | Dan Rossi | Date: | Wed, 13 Apr 2005 05:12:42 +0000 |
| Subject: | Re: Issues with Event_Dispatcher | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18717@lists.php.net to get a copy of this message | ||
another correction
Logout {
function Logout() {
}
function get($notification)
{
switch ($notification->getNotificationName()) {
case 'onLogin':
$this->onLogin();
break;
case 'onLogout':
$this->onLogout();
break;
}
}
function onLogin()
{
}
}
$logout = new Logout;
$dispatcher->addObserver(array($logout,'get'));