src/Server/Components/Event/EventDispatcher.php
public function remove($type, $listener)
    {
        if (array_key_exists($type, $this->_eventListeners)) {
            $index = array_search($listener, $this->_eventListeners [$type]);
            if ($index !== null) {
                unset ($this->_eventListeners [$type] [$index]);
            }
            $numListeners = count($this->_eventListeners [$type]);
            if ($numListeners == 0) {
                unset ($this->_eventListeners [$type]);
            }
        }
    }
public function remove($type, $listener)
    {
        if (array_key_exists($type, $this->_eventListeners)) {
            $index = array_search($listener, $this->_eventListeners [$type]);
            if ($index !== null) {
                unset ($this->_eventListeners [$type] [$index]);
            }
            $numListeners = count($this->_eventListeners [$type]);
            if ($numListeners == 0) {
                unset ($this->_eventListeners [$type]);
            }
        }
    }
public function remove ( $ type , $ listener ) { if ( array_key_exists ( $ type , $ this -> _eventListeners ) ) { $ index = array_search ( $ listener , $ this -> _eventListeners [ $ type ] ) ; if ( $ index !== null ) { unset ( $ this -> _eventListeners [ $ type ] [ $ index ] ) ; } $ numListeners = count ( $ this -> _eventListeners [ $ type ] ) ; if ( $ numListeners == 0 ) { unset ( $ this -> _eventListeners [ $ type ] ) ; } } }
Removes an event listener from the object.

@param string $type
@param callable $listener
Removes an event listener from the object .