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]);
            }
        }
    }
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]);
            }
        }
    }
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 ] ) ; } } }
Detach an handler from an event.
@param string $eventName
@param callable $handler
Detach an handler from an event .