public function detachHandler($name, callable $callback)
    {
        if (! isset($this->events[$name])) {
            return false;
        }
        $index = array_search($callback, $this->events[$name], true);
        if ($index === false) {
            return false;
        }
        unset($this->events[$name][$index]);
        return true;
    }