public function registerListener(EventListener $eventListener) { $events = $eventListener->getEvents(); foreach ($events as $e) { if (!isset($this->listeners[$e])) { $this->listeners[$e] = array(); } $this->listeners[$e][] = $eventListener; } }