Exemple #1
0
 /**
  * Dispatches the specified event.
  * @param EventInterface $event
  */
 public function dispatch(EventInterface $event)
 {
     $listenerName = $event->getEventName() . 'Handler';
     $handlers = $this->loadListeners($listenerName);
     foreach ($handlers as $handler) {
         $handler->handle($event);
     }
 }
 /**
  * @param \TomWright\Eventing\Event\EventInterface $event
  * @return mixed|void
  */
 public function handle(\TomWright\Eventing\Event\EventInterface $event)
 {
     $event->setNotified(true);
 }