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]);
            }
        }
    }