public function detach(SubscriberInterface $subscriber)
 {
     foreach ($subscriber->getEvents() as $eventName => $listener) {
         $this->removeListener($eventName, [$subscriber, $listener[0]]);
     }
 }
Beispiel #2
0
 /**
  * 解绑订阅者
  * @param SubscriberInterface $subscriber
  */
 function removeSubscriber(SubscriberInterface $subscriber)
 {
     foreach ($subscriber->getEvents() as $eventName => $method) {
         $this->unbind($eventName, [$subscriber, $method]);
     }
 }