getPriority() public method

public getPriority ( ) : integer
return integer
コード例 #1
0
ファイル: HandlerList.php プロジェクト: worlds1/NIGHTMARE
 /**
  * @param RegisteredListener|Listener|Plugin $object
  */
 public function unregister($object)
 {
     if ($object instanceof Plugin or $object instanceof Listener) {
         $changed = \false;
         foreach ($this->handlerSlots as $priority => $list) {
             foreach ($list as $hash => $listener) {
                 if ($object instanceof Plugin and $listener->getPlugin() === $object or $object instanceof Listener and $listener->getListener() === $object) {
                     unset($this->handlerSlots[$priority][$hash]);
                     $changed = \true;
                 }
             }
         }
         if ($changed === \true) {
             $this->handlers = \null;
         }
     } elseif ($object instanceof RegisteredListener) {
         if (isset($this->handlerSlots[$object->getPriority()][\spl_object_hash($object)])) {
             unset($this->handlerSlots[$object->getPriority()][\spl_object_hash($object)]);
             $this->handlers = \null;
         }
     }
 }