src/Event/Manager.php
public function disableHandler($name)
    {
        if (in_array($name, self::$debugEvents)) {
            throw new InvalidArgumentException("Cannot disable debug event");
        }
        if ($this->debug) {
            $debugArgs = new Args([
                'name'    => $name,
                'source'  => 'core:event:debug',
                'level'   => E_NOTICE,
            ]);
            $this->fire(':onDisableHandler:', $debugArgs);
        }
        $this->disabledEvents[$name] = true;
    }
public function disableHandler($name)
    {
        if (in_array($name, self::$debugEvents)) {
            throw new InvalidArgumentException("Cannot disable debug event");
        }
        if ($this->debug) {
            $debugArgs = new Args([
                'name'    => $name,
                'source'  => 'core:event:debug',
                'level'   => E_NOTICE,
            ]);
            $this->fire(':onDisableHandler:', $debugArgs);
        }
        $this->disabledEvents[$name] = true;
    }
public function disableHandler ( $ name ) { if ( in_array ( $ name , self :: $ debugEvents ) ) { throw new InvalidArgumentException ( "Cannot disable debug event" ) ; } if ( $ this -> debug ) { $ debugArgs = new Args ( [ 'name' => $ name , 'source' => 'core:event:debug' , 'level' => E_NOTICE , ] ) ; $ this -> fire ( ':onDisableHandler:' , $ debugArgs ) ; } $ this -> disabledEvents [ $ name ] = true ; }
Disables handler.

@param  string $name  Event name
@return void
@throws InvalidArgumentException  In case of disabling debug event.
Disables handler .