Ejemplo n.º 1
0
 function dispatch($eventName, Event $event = null)
 {
     if ($event == null) {
         $event = new Event(null);
     }
     $event->setEventName($eventName);
     $event->setDispatcher($this);
     $sortedListeners = $this->sortListeners($eventName);
     foreach ($sortedListeners as $listeners) {
         foreach ($listeners as $listener) {
             call_user_func($listener, $event);
             if ($event->isEventPropagationStopped()) {
                 break;
             }
         }
     }
     return $event;
 }
Ejemplo n.º 2
0
 public function __construct(Request $request, Response $response)
 {
     parent::__construct($request);
     $this->response = $response;
 }
Ejemplo n.º 3
0
 public function __construct(Request $request)
 {
     parent::__construct($request);
 }