/** * @inheritdoc */ protected function initialize() { $routingMiddleware = $this->getRoutingMiddleware($this->router, RoutingResult::class); $this->pipeEach($this->beforeRoutingMiddlewares); $this->pipe($routingMiddleware); parent::initialize(); $this->pipeEach($this->beforeEmitterMiddlewares); }