Detach all our listeners from the event manager

@param  SharedEventManagerInterface $events
@return $this
540524
public function detachShared(SharedEventManagerInterface $events)
    {
        if ($events->detach($this->listener,'Zend\Mvc\Application')) {
            $this->listener = null;
        }
        return $this;
    }
998842
public function remove(EventInterface $event)
    {
        $index = $this->computeIndex($event);
        if (isset($this->events[$index])) {
            foreach ($this->events[$index] as $key => $internalEvent) {
                if ($event->getUid() == $internalEvent->getUid()) {
                    unset($this->events[$index][$key]);
                    --$this->count;
                }
            }
        }
    }
1343621
protected function removeListener(array $listeners , $eventObject , $callback) {
        if (isset($listeners[$eventObject->getName()])) {
            if (($index = array_search($callback, $listeners[$eventObject->getName()])) !== false) {
                unset($listeners[$eventObject->getName()][$index]);
                if(empty($listeners[$eventObject->getName()])) {
                    unset($listeners[$eventObject->getName()]);
                } else {
                    $listeners[$eventObject->getName()] = array_values($listeners[$eventObject->getName()]);
                }
            }
        }
        return $listeners;
    }
62958
public function attach(EventManagerInterface $events)
    {
        $this->listeners[] = $events->attach(MvcEvent::EVENT_FINISH, array($this, 'onFinish'));
    }
474163
protected function sortListeners(string $event) : interfaces\Emitter
    {
        if (!isset($this->listeners[$event])) {
            return $this;
        }

        // Sort the listeners by priority in a descending order.
        krsort($this->listeners[$event]);

        $this->chain[$event] = array_merge(...$this->listeners[$event]);

        return $this;
    }
156195
public function attach(EventManagerInterface $events)
    {
        $this->listeners[] = $events->attach('configureService', array($this, 'handleExcludeAnnotation'));
        $this->listeners[] = $events->attach('configureService', array($this, 'handleContextAnnotation'));
        $this->listeners[] = $events->attach('configureService', array($this, 'handleExcludePatternAnnotation'));
        $this->listeners[] = $events->attach('configureService', array($this, 'handleVersionAnnotation'));
    }
663359
public function removeEventListener($eventName, $listener)
    {
        if (!$this->dispatcher) {
            $this->dispatcher = new EventDispatcher();
        }

        $this->dispatcher->removeListener($eventName, $listener);

        return $this;
    }
767376
public function removeAllListeners($event_name=null)
    {
        // Read in our config/events file so that we have them all!
        if (! $this->have_read_from_file)
        {
            $this->readConfigFile();
        }

        if (! is_null($event_name))
        {
            unset($this->listeners[$event_name]);
        }
        else {
            $this->listeners = [];
        }

        return $this;
    }
198161
public function attach(EventManagerInterface $events)
    {
        $eventConfigListener = new modules\EventConfigModuleListener($this->serviceLocator);

        $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES_POST, $eventConfigListener);
        $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE_RESOLVE, array($this, 'resolve'), 100);

        return $this;
    }
113134
function detachListener(iListener $listener)
    {
        $this->_listenerQueue()->del($listener);

        if (in_array($listener, $this->_c_listeners)) {
            foreach ($this->_c_listeners as $k => $l) {
                if ($l === $listener) {
                    unset($this->_c_listeners[$k]);
                    break;
                }
            }
        }

        return $this;
    }
114528
public function setEventManager( EventManagerInterface $events )
    {
        $events->setEventClass( __NAMESPACE__ . '\ModulesEvent' )
               ->attach(
                    ModulesEvent::EVENT_MODULES,
                    array( $this, 'onModules' ),
                    1000
                );

        return parent::setEventManager( $events );
    }
641488
public function removeEventListener(string $name, callable $listener): self
    {
        if (isset($this->internalEventListenersData[$name])) {
            foreach ($this->internalEventListenersData[$name] as $i => $value) {
                if ($value === $listener) {
                    unset($this->internalEventListenersData[$name][$i]);
                    if (empty($this->internalEventListenersData[$name])) {
                        unset($this->internalEventListenersData[$name]);
                    }
                    break;
                }
            }
        }
        return $this;
    }
1072347
protected function removeListenerFromEvent(callable $listener, string $event) : interfaces\Emitter
    {
        foreach ($this->listeners[$event] as $priority => $listeners) {
            if (false !== $key = array_search($listener, $listeners, true)) {
                unset($this->listeners[$event][$priority][$key], $this->chain[$event]);
            }
        }

        return $this;
    }
161241
public function mergeEventListeners($eventListeners)
    {
        if ($eventListeners instanceof EventManagerInterface) {
            $eventListeners = $eventListeners->getEventListeners();
        }

        foreach (((array) $eventListeners) as $eventName => $listeners) {
            $queue = [];
            if (isset($this->eventListeners[$eventName])) {
                $innerListeners = clone $this->eventListeners[$eventName];
                $innerListeners->setExtractFlags(ListenerQueue::EXTR_DATA);
                foreach ($innerListeners as $callback) {
                    $queue[] = $callback;
                }
            }
            $listeners = clone $listeners;
            $listeners->setExtractFlags(ListenerQueue::EXTR_BOTH);
            foreach ($listeners as $listener) {
                if (!in_array($listener['data'], $queue)) {
                    $this->attach($eventName, $listener['data'], $listener['priority']);
                }
            }
        }

        return true;
    }
535309
public function detach(\Zend_EventManager_EventCollection $events)
    {
        foreach($this->listeners as $index => $listener) {
            if($events->detach($listener)) {
                unset($this->listeners[$index]);
            }
        }
    }
1290191
public function removeListener( $eventName, IListener $listener )
    {
        if ( !isset( $this->listeners[ $eventName ] ) )
        {
            return $this;
        }

        foreach ( $this->listeners[ $eventName ] as $priority => $listeners )
        {
            if ( FALSE !== ( $key = array_search( $listener, $listeners, TRUE ) ) )
            {
                unset( $this->listeners[ $eventName ][ $priority ][ $key ], $this->_sorted[ $eventName ] );
            }
        }

        return $this;
    }
494872
public function detach(string $event, $callback){
        if(isset($this->listeners[$event])){
            return $this->listeners[$event]->remove($callback);
        }
        return false;
    }