src/Leevel/Event/Dispatch.php
public function get($event): array
    {
        $listeners = [];

        $event = $this->normalizeEvent($event);

        if (isset($this->listeners[$event])) {
            $listeners = $this->listeners[$event];
        }

        foreach ($this->wildcards as $key => $item) {
            $key = $this->prepareRegexForWildcard($key);

            if (preg_match($key, $event, $res)) {
                foreach ($item as $priority => $value) {
                    $listeners[$priority] = array_merge($listeners[$priority] ?? [], $value);
                }
            }
        }

        return $listeners;
    }
public function get($event): array
    {
        $listeners = [];

        $event = $this->normalizeEvent($event);

        if (isset($this->listeners[$event])) {
            $listeners = $this->listeners[$event];
        }

        foreach ($this->wildcards as $key => $item) {
            $key = $this->prepareRegexForWildcard($key);

            if (preg_match($key, $event, $res)) {
                foreach ($item as $priority => $value) {
                    $listeners[$priority] = array_merge($listeners[$priority] ?? [], $value);
                }
            }
        }

        return $listeners;
    }
获取一个事件监听器.

@param object|string $event

@return array