src/Viserio/Component/Events/EventManager.php
private function addListenerPattern(ListenerPattern $pattern): void
    {
        $this->patterns[$pattern->getEventPattern()][] = $pattern;

        foreach ($this->syncedEvents as $eventName => $value) {
            if ($pattern->test($eventName)) {
                unset($this->syncedEvents[$eventName]);
            }
        }
    }
private function addListenerPattern(ListenerPattern $pattern): void
    {
        $this->patterns[$pattern->getEventPattern()][] = $pattern;

        foreach ($this->syncedEvents as $eventName => $value) {
            if ($pattern->test($eventName)) {
                unset($this->syncedEvents[$eventName]);
            }
        }
    }
Adds an event listener for all events matching the specified pattern.

This method will lazily register the listener when a matching event is
dispatched.

@param \Viserio\Component\Events\ListenerPattern $pattern

@return void