controllerResolver = $controllerResolver; $this->router = $router; // Call the constructor as late as possible (it runs `initialise`). parent::__construct($input, $config, $client, $response); } /** * Method to run the application routines. * * @return void */ protected function doExecute(): void { $route = $this->router->parseRoute($this->get('uri.route'), $this->input->getMethod()); // Add variables to the input if not already set foreach ($route->getRouteVariables() as $key => $value) { $this->input->def($key, $value); } \call_user_func($this->controllerResolver->resolve($route)); } }