public function detach($eventName, callable $handler)
    {
        if (isset($this->events[$eventName])) {
            $this->events[$eventName]->remove($handler);
            if (0 == count($this->events[$eventName])) {
                unset($this->events[$eventName]);
            }
        }
    }