/** * Check if the handler is connected to a dispatcher * * @param object The event dispatcher * @return boolean TRUE if the handler is already connected to the dispatcher. FALSE otherwise. */ public function isSubscribed(KEventSubscriberInterface $subscriber) { $handle = $subscriber->getHandle(); return isset($this->_subscribers[$handle]); }
/** * Remove an event subscriber * * @param KEventSubscriberInterface $subscriber An event subscriber * @return KObjectInterface The mixer */ public function removeEventSubscriber(KEventSubscriberInterface $subscriber) { $subscriber->unsubscribe($this->getEventPublisher()); return $this->getMixer(); }