/** * Get the wildcard listeners for the event. * * @param string $eventName * * @return array */ private function get_wildcard_listeners($eventName) { $wildcards = []; foreach ($this->wildcards as $wildcard => $listeners) { if (Util::pattern_matches($eventName, $wildcard)) { $wildcards = array_merge($wildcards, $listeners); } } return $wildcards; }