Prooph\ServiceBus\Plugin\Router\RegexRouter::onRouteEvent PHP Метод

onRouteEvent() приватный Метод

private onRouteEvent ( Prooph\Common\Event\ActionEvent $actionEvent )
$actionEvent Prooph\Common\Event\ActionEvent
    private function onRouteEvent(ActionEvent $actionEvent)
    {
        $messageName = (string) $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_NAME);
        if (empty($messageName)) {
            return;
        }
        foreach ($this->patternMap as $map) {
            list($pattern, $handler) = each($map);
            if (preg_match($pattern, $messageName)) {
                $listeners = $actionEvent->getParam(EventBus::EVENT_PARAM_EVENT_LISTENERS, []);
                $listeners[] = $handler;
                $actionEvent->setParam(EventBus::EVENT_PARAM_EVENT_LISTENERS, $listeners);
            }
        }
    }