src/Event/Manager.php
protected function deleteHandler(/** @noinspection PhpUnusedParameterInspection */ I_Registry $args, $name, $index = null)
    {
        $cleanupAllHandlers = is_null($index);
        if (!$cleanupAllHandlers) {
            unset($this->handlers[$name][$index]);
            if (sizeof($this->handlers[$name])) {
                ksort($this->handlers[$name]);
                unset($this->orderedHandlers[$name]);
            } else {
                $cleanupAllHandlers = true;
            }
        }
        if ($cleanupAllHandlers) {
            // Cleanup all handlers with specified name
            unset($this->handlers[$name], $this->orderedHandlers[$name]);
        }
    }
protected function deleteHandler(/** @noinspection PhpUnusedParameterInspection */ I_Registry $args, $name, $index = null)
    {
        $cleanupAllHandlers = is_null($index);
        if (!$cleanupAllHandlers) {
            unset($this->handlers[$name][$index]);
            if (sizeof($this->handlers[$name])) {
                ksort($this->handlers[$name]);
                unset($this->orderedHandlers[$name]);
            } else {
                $cleanupAllHandlers = true;
            }
        }
        if ($cleanupAllHandlers) {
            // Cleanup all handlers with specified name
            unset($this->handlers[$name], $this->orderedHandlers[$name]);
        }
    }
protected function deleteHandler ( /** @noinspection PhpUnusedParameterInspection */ I_Registry $ args , $ name , $ index = null ) { $ cleanupAllHandlers = is_null ( $ index ) ; if ( ! $ cleanupAllHandlers ) { unset ( $ this -> handlers [ $ name ] [ $ index ] ) ; if ( sizeof ( $ this -> handlers [ $ name ] ) ) { ksort ( $ this -> handlers [ $ name ] ) ; unset ( $ this -> orderedHandlers [ $ name ] ) ; } else { $ cleanupAllHandlers = true ; } } if ( $ cleanupAllHandlers ) { // Cleanup all handlers with specified name
 unset ( $ this -> handlers [ $ name ] , $ this -> orderedHandlers [ $ name ] ) ; } }
Deletes handler.

@param  I_Registry $args   Any arguments, can be used to return something
@param  string     $name   Event name
@param  int        $index  Index in self::$handlers[$name] array or null
if $handler parameter not callback or its part
@return void
@see Manager::dropHandler()
@internal
Deletes handler .