public function run()
    {
        $this->requestId = uniqid();
        $this->startTime = microtime();

        try {
            // Generate a Request object from the data available in the
            // current running environment.
            try {
            $requestFactory = new Requests\Factories\Http;
            $request = $requestFactory->get($this);
                // Set the application locale from the request.
                // TODO: Move into the Request constructor?
                $this->setLocale($request->getLocale());
                // Run the process of responding to the request.
                $this->issueResponse($request);
            } catch (\Throwable $throwable) {
                // There was an error somewhere during the request
                // creation, or somewhere during the response building
                // process.
                $errorRequest = new Requests\Http\Error;
                $errorRequest->setThrowable($throwable);
                $this->issueResponse($errorRequest, $throwable);
            }
        } catch (\Exception $exception) {
            // There was an error while trying to fail gracefully.
            // Little else can be done now.
            $this->fail($exception);
        }

        Logger::get()->info($this->getStats());

        // Since the application is being run in an HTTP context, and
        // PHP is the scripting language it is, the application cycle
        // just finishes after the response is done with its tasks.
    }