Removes an event listener from the specified events.

@param string|string[] $events
@param string|int|object $listener
@phpcsSuppress SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint
2534
public function removeEventListener($events, $listener): void
	{
		if (!is_object($listener)) {
			$hash = 'service@' . $listener;
		} else {
			// Picks the hash code related to that listener
			$hash = spl_object_hash($listener);
		}
		foreach ((array) $events as $event) {
			// Check if actually have this listener associated
			if (isset($this->listeners[$event][$hash])) {
				unset($this->listeners[$event][$hash]);
			}
		}
	}
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;
    }
117848
public function removeListener(EventListener $listener)
    {
        if (($i = array_search($listener, $this->listeners)) !== false) {
            unset($this->listeners[$i]);
        }
        return $this;
    }
1288795
protected final <T extends EventListener> void removeListener(Class<T> listenerType, T listener) {
		if (this.listeners != null) {
			this.listeners.remove(listenerType, listener);
			if (this.listeners.isEmpty()) {
				this.listeners = null;
			}
		}
	}
645397
private function invokeListener($listener, $event)
    {
        if (is_array($listener))
        {
            list($listenerClass, $method) = $listener;

            $listenerInstance = $this->objectManager->get($listenerClass);
            $listenerInstance->{$method}($event);
        }
        else
        {
            call_user_func($listener, $event);
        }
    }
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;
    }
620644
public final void removeListener(
            @NonNull final Listener<DataType, KeyType, ViewType, ParamType> listener) {
        listeners.remove(listener);
    }
1106737
public static function removeAllListeners(string $event) : void
    {
        if (Event::hasListeners($event)) {
            unset(Event::$listeners[$event]);
        }
    }
1319178
public function addEventListener($events, $listener)
    {
        // Picks the hash code related to that listener
        $hash = spl_object_hash($listener);

        foreach ((array) $events as $event) {
            // Overrides listener if a previous one was associated already
            // Prevents duplicate listeners on same event (same instance only)
            $this->_listeners[$event][$hash] = $listener;
        }
    }
1355843
@Override
    final public void removeConnectionEventListener(
                                                    final ConnectionEventListener listener) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "removeConnectionEventListener", listener);
        }

        synchronized (_connectionListeners) {
            _connectionListeners.remove(listener);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "removeConnectionEventListener");
        }

    }
932761
public function removeListener(
        string $event,
        callable $listener
    )
    {
        if ($this->_events[$event] ?? false) {

            $key = array_search(
                $listener,
                $this->_events[$event],
                true
            );

            if ($key !== false) {

                array_splice(
                    $this->_events[$event],
                    $key,
                    1
                );
            }
        }

        return $this;
    }
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;
    }
496195
public function removeListener($event_name, callable $listener)
    {
        // Read in our config/events file so that we have them all!
        if (! $this->have_read_from_file)
        {
            $this->readConfigFile();
        }

        if (! isset($this->listeners[$event_name]))
        {
            return false;
        }

        foreach ($this->listeners[$event_name][2] as $index => $check)
        {
            if ($check === $listener)
            {
                unset($this->listeners[$event_name][1][$index]);
                unset($this->listeners[$event_name][2][$index]);

                return true;
            }
        }

        return false;
    }
923188
public function removeListener(string $eventName, callable $listener) : bool
    {
        if (!isset($this->listeners[$eventName])) {
            return false;
        }
        foreach ($this->listeners[$eventName][2] as $index => $check) {
            if ($check === $listener) {
                unset($this->listeners[$eventName][1][$index]);
                unset($this->listeners[$eventName][2][$index]);
                return true;
            }
        }
        return false;
    }
937415
public function removeListener($eventNames, $listener)
    {
        $key = $this->getListenerKey($listener);
        foreach ((Array) $eventNames as $eventName) {
            if (isset($this->listeners[$eventName][$key])) {
                unset($this->listeners[$eventName][$key]);
            }
        }
        return $this;
    }
364586
@SafeVarargs
    public final void removeCalendarListeners(ListChangeListener<Calendar>... listeners) {
        if (listeners != null) {
            for (ListChangeListener<Calendar> listener : listeners) {
                getCalendars().removeListener(listener);
            }
        }
    }
838529
public function removeListener($listener, $event = null): bool
    {
        if ($event) {
            if ($event instanceof EventInterface) {
                $event = $event->getName();
            }

            // 存在对这个事件的监听队列
            if (isset($this->listeners[$event])) {
                $this->listeners[$event]->remove($listener);
            }
        } else {
            foreach ($this->listeners as $queue) {
                /**  @var $queue ListenerQueue */
                $queue->remove($listener);
            }
        }

        return true;
    }