Get the wildcard listeners for the event.

@param string $eventName

@return array
761822
protected function getWildcardListeners($eventName)
    {
        $wildcards = [];

        foreach ($this->wildcards as $key => $listeners) {
            if ($this->wildcardContainsEvent($key, $eventName)) {
                $wildcards = array_merge($wildcards, $listeners);
            }
        }

        return $this->wildcardsCache[$eventName] = $wildcards;
    }
204187
public function getAccessLevelsForEvent($eventName)
    {
        if (!isset($this->items[$eventName])) {
            return false;
        }
        
        return $this->items[$eventName];
    }
96997
function removeAllListeners(string $eventName = null) {

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

    }
137860
public function exportEventTypes($eventName) {
        $exports = array();
        $items = $this->getEventTypes($eventName);
        foreach ($items as $item) {
            $exports[] = $this->prepareExportEventType($item);
        }
        return $exports;
    }
1190104
public function getListeners($eventName = NULL)
	{
		if($eventName === NULL)
		{
			$listeners = [];
			
			foreach(array_keys($this->listeners) as $k)
			{
				$listeners[$k] = [];
				
				foreach(clone $this->listeners[$k] as $listener)
				{
					$listeners[$k][] = $listener;
				}
			}
			
			ksort($listeners);
			
			return $listeners;
		}
		
		if($eventName instanceof \ReflectionClass)
		{
			$eventName = $eventName->name;
		}
		
		if(empty($this->listeners[$eventName]))
		{
			return [];
		}
		
		$listeners = [];
		
		foreach(clone $this->listeners[$eventName] as $listener)
		{
			$listeners[] = $listener;
		}
		
		return $listeners;
	}
153927
public function getListeners($eventName = null)
    {

        if (empty($eventName)) return $this->listeners;
        if (!empty($eventName) && !isset($this->listeners[$eventName])) return [];

        return $this->listeners[$eventName];
    }
27730
public function hasListeners($eventName = null)
    {
        return ($this->symfonyDispatcher->hasListeners($eventName) ||
            $this->laravelDispatcher->hasListeners($eventName));
    }
712069
private function getSortedRegistry($eventName) {
		
		if(!isset($this->sortedRegistry[$eventName])) {
			
			$this->sortedRegistry[$eventName] = [];
			
			if (isset($this->registry[$eventName])) {
				
				// sort reverse by priority key

				krsort($this->registry[$eventName]);
				
				// merge the sorted arrays into one

				$this->sortedRegistry[$eventName] = call_user_func_array('array_merge', $this->registry[$eventName]);
			}
		}

		return $this->sortedRegistry[$eventName];

	}
1025269
protected function matchEventQueues(
        /*# string */ $eventName
    )/*: EventQueueInterface */ {
        $nqueue = $this->newEventQueue();
        $names  = $this->globbingNames($eventName, $this->getEventNames());
        foreach ($names as $evtName) {
            if ($this->hasEvent($evtName)) {
                $nqueue = $nqueue->combine($this->events[$evtName]);
            }
        }
        return $nqueue;
    }
788436
public function removeAllListeners(string $eventName = null)
    {
        if (\is_null($eventName)) {
            $this->listeners = [];
            $this->wildcardListeners = [];
        } else {
            if ('*' === $eventName[\strlen($eventName) - 1]) {
                // Wildcard event
                unset($this->wildcardListeners[\substr($eventName, 0, -1)]);
            } else {
                unset($this->listeners[$eventName]);
            }
        }

        // Reset index
        $this->listenerIndex = [];
    }
831701
private function sortListeners(string $eventName)
	{
        $listeners = &$this->listeners[$eventName];

		\krsort($listeners);
		$this->sorted[$eventName] = \array_merge(...$listeners);
	}
944830
protected function getListeners(string $eventName): array
    {
        if (!isset($this->listeners[$eventName])) {
            return [];
        }

        if (!isset($this->sortedListeners[$eventName])) {
            $this->sortedListeners[$eventName] = $this->sortEventListeners($eventName);
        }

        return $this->sortedListeners[$eventName];
    }
1290733
public function hasListeners($eventName)
    {
        if ($listeners = $this->events->getListeners($eventName)) {
            return true;
        }

        if ($listeners = $this->events->getListeners($eventName, 'before')) {
            return true;
        }

        if ($listeners = $this->events->getListeners($eventName, 'after')) {
            return true;
        }

        return false;
    }
148548
@SuppressWarnings("unchecked")
  @Deprecated
  public List<ExecutionListener> getExecutionListeners(String eventName) {
    return (List) super.getListeners(eventName);
  }
688843
protected function wildcardContainsEvent($wildcard, $eventName)
    {
        $patterns = Arr::wrap($wildcard);

        if (empty($patterns)) {
            return false;
        }

        foreach ($patterns as $pattern) {
            // If the given event is an exact match we can of course return true right
            // from the beginning. Otherwise, we will translate asterisks and do an
            // actual pattern match against the two strings to see if they match.
            if ($pattern == $eventName) {
                return true;
            }

            $pattern = preg_quote($pattern, '#');

            // Asterisks are translated into zero-or-more regular expression wildcards
            // to make it convenient to check if the strings starts with the given
            // pattern such as "library/*", making any string check convenient.
            $pattern = str_replace('\*', '.*', $pattern);

            if (preg_match('#^'.$pattern.'\z#u', $eventName) === 1) {
                return true;
            }
        }

        return false;
    }
1334609
protected function addInterfaceListeners($eventName, array $listeners = [])
    {
        foreach (class_implements($eventName) as $interface) {
            if (isset($this->listeners[$interface])) {
                foreach ($this->listeners[$interface] as $names) {
                    $listeners = array_merge($listeners, (array) $names);
                }
            }
        }

        return $listeners;
    }
597850
public function listeners($event): array
    {
        $name = \get_class($event);

        $localListeners  = $this->events[$name] ?? [];
        $globalListeners = static::$globalEvents[$name] ?? [];

        return array_merge($globalListeners, $localListeners);
    }