dispatcher = $dispatcher; $this->listener_collection = $listener_collection; } public function load() { if (!empty($this->listener_collection)) { foreach ($this->listener_collection as $listener) { $this->dispatcher->addSubscriber($listener); } } } }