src/Event/Manager.php
public function dropHandlers($name = '', $handler = null)
    {
        if (in_array($name, self::$debugEvents)) {
            throw new InvalidArgumentException("Cannot drop debug event");
        }
        if ($this->debug) {
            $debugArgs = new Args([
                'name'    => $name,
                'handler' => $handler,
                'source'  => 'core:event:debug',
                'level'   => E_NOTICE,
            ]);
            $this->fire(':onDropHandlers:', $debugArgs);
        }
        $this->runByHandler($name, $handler, [$this, 'deleteHandler']);
    }
public function dropHandlers($name = '', $handler = null)
    {
        if (in_array($name, self::$debugEvents)) {
            throw new InvalidArgumentException("Cannot drop debug event");
        }
        if ($this->debug) {
            $debugArgs = new Args([
                'name'    => $name,
                'handler' => $handler,
                'source'  => 'core:event:debug',
                'level'   => E_NOTICE,
            ]);
            $this->fire(':onDropHandlers:', $debugArgs);
        }
        $this->runByHandler($name, $handler, [$this, 'deleteHandler']);
    }
public function dropHandlers ( $ name = '' , $ handler = null ) { if ( in_array ( $ name , self :: $ debugEvents ) ) { throw new InvalidArgumentException ( "Cannot drop debug event" ) ; } if ( $ this -> debug ) { $ debugArgs = new Args ( [ 'name' => $ name , 'handler' => $ handler , 'source' => 'core:event:debug' , 'level' => E_NOTICE , ] ) ; $ this -> fire ( ':onDropHandlers:' , $ debugArgs ) ; } $ this -> runByHandler ( $ name , $ handler , [ $ this , 'deleteHandler' ] ) ; }
Drops event handlers.

Example:
```
// drop all 'someEventName' event handlers
Manager::dropHandler('someEventName');

// drop all 'someEventName' event handlers processing by $object methods only
Manager::dropHandler('someEventName', $object);
```

@param  string $name     Event name
@param  mixed  $handler  Handler or its part criteria
@return void
@throws InvalidArgumentException  In case of dropping debug event.
Drops event handlers .