Prooph\ServiceBus\MessageBus::utilize PHP Метод

utilize() публичный Метод

public utilize ( Prooph\Common\Event\ActionEventListenerAggregate $plugin )
$plugin Prooph\Common\Event\ActionEventListenerAggregate
    public function utilize(ActionEventListenerAggregate $plugin)
    {
        $plugin->attach($this->getActionEventEmitter());
    }

Usage Example

Пример #1
0
 /**
  * @param MessageBus $bus
  * @param array $routerConfig
  */
 private function attachRouter(MessageBus $bus, array &$routerConfig)
 {
     $routerClass = isset($routerConfig['type']) ? (string) $routerConfig['type'] : $this->getDefaultRouterClass();
     $routes = isset($routerConfig['routes']) ? $routerConfig['routes'] : [];
     $router = new $routerClass($routes);
     $bus->utilize($router);
 }
All Usage Examples Of Prooph\ServiceBus\MessageBus::utilize