public static function off($name, $callback = null)
    {
        if (empty(self::$events[$name])) {
            return null;
        } elseif ($callback === null) {
            self::$events[$name] = array();
            return null;
        }

        $evts = self::$events[$name];

        foreach ($evts as $key => $value) {
            if ($value[0] === $callback) {
                unset($evts[$key]);
            }
        }

        self::$events[$name] = $evts;
        $evts = null;
    }
public static function off($name, $callback = null)
    {
        if (empty(self::$events[$name])) {
            return null;
        } elseif ($callback === null) {
            self::$events[$name] = array();
            return null;
        }

        $evts = self::$events[$name];

        foreach ($evts as $key => $value) {
            if ($value[0] === $callback) {
                unset($evts[$key]);
            }
        }

        self::$events[$name] = $evts;
        $evts = null;
    }
public static function off ( $ name , $ callback = null ) { if ( empty ( self :: $ events [ $ name ] ) ) { return null ; } elseif ( $ callback === null ) { self :: $ events [ $ name ] = array ( ) ; return null ; } $ evts = self :: $ events [ $ name ] ; foreach ( $ evts as $ key => $ value ) { if ( $ value [ 0 ] === $ callback ) { unset ( $ evts [ $ key ] ) ; } } self :: $ events [ $ name ] = $ evts ; $ evts = null ; }
Unregister 1 or all events

@param string   $name
@param callable $callback
@return void
Unregister 1 or all events