/** * Handles a HTTP request * * @return void */ public function handleRequest() { // Create the request very early so the Resource Management has a chance to grab it: $this->request = Request::createFromEnvironment(); $this->response = new Response(); $this->boot(); $this->resolveDependencies(); $this->addPoweredByHeader($this->response); if (isset($this->settings['http']['baseUri'])) { $this->request->setBaseUri(new Uri($this->settings['http']['baseUri'])); } $componentContext = new ComponentContext($this->request, $this->response); $this->baseComponentChain->handle($componentContext); $this->response = $this->baseComponentChain->getResponse(); $this->response->send(); $this->bootstrap->shutdown(Bootstrap::RUNLEVEL_RUNTIME); $this->exit->__invoke(); }