/** * Get the wildcard listeners for the event. * * @param string $eventName * @return array */ protected function getWildcardListeners($eventName) { $wildcards = []; foreach ($this->wildcards as $key => $listeners) { if (Str::is($key, $eventName)) { $wildcards = array_merge($wildcards, $listeners); } } return $wildcards; }
/** * Determine if a given string matches a given pattern. * * @param string $pattern * @param string $value * @return bool */ function str_is($pattern, $value) { return Str::is($pattern, $value); }