91 foreach($this->handlerSlots as $priority => $list){
92 foreach($list as $hash => $listener){
93 if(($object instanceof
Plugin && $listener->getPlugin() === $object)
94 || ($object instanceof
Listener && (
new \ReflectionFunction($listener->getHandler()))->getClosureThis() === $object)
96 unset($this->handlerSlots[$priority][$hash]);
101 unset($this->handlerSlots[$object->getPriority()][spl_object_id($object)]);
103 $this->invalidateAffectedCaches();
140 if($this->handlerCache->list !== null){
141 return $this->handlerCache->list;
145 for($currentList = $this; $currentList !==
null; $currentList = $currentList->parentList){
146 $handlerLists[] = $currentList;
149 $listenersByPriority = [];
150 foreach($handlerLists as $currentList){
151 foreach($currentList->handlerSlots as $priority => $listeners){
152 $listenersByPriority[$priority] = array_merge($listenersByPriority[$priority] ?? [], $listeners);
157 krsort($listenersByPriority, SORT_NUMERIC);
159 return $this->handlerCache->list = array_merge(...$listenersByPriority);