src/Leevel/Event/Dispatch.php
public function register($event, $listener, int $priority = 500): void
    {
        $event = is_object($event) ? [$event] : (array) $event;

        foreach ($event as $item) {
            $item = $this->normalizeEvent($item);

            if (false !== strpos($item, '*')) {
                $this->wildcards[$item][$priority][] = $listener;
            } else {
                $this->listeners[$item][$priority][] = $listener;
            }
        }
    }
public function register($event, $listener, int $priority = 500): void
    {
        $event = is_object($event) ? [$event] : (array) $event;

        foreach ($event as $item) {
            $item = $this->normalizeEvent($item);

            if (false !== strpos($item, '*')) {
                $this->wildcards[$item][$priority][] = $listener;
            } else {
                $this->listeners[$item][$priority][] = $listener;
            }
        }
    }
注册监听器.

@param array|object|string $event
@param mixed               $listener
@param int                 $priority