public function sendPhpResponse($exception)
    {
        if (!$exception instanceof FlattenException) {
            $exception = FlattenException::create($exception);
        }

        header(sprintf('HTTP/1.0 %s', $exception->getStatusCode()));
        foreach ($exception->getHeaders() as $name => $value) {
            header($name . ': ' . $value, false);
        }

        echo $this->decorate($this->getContent($exception, $this->showAllExceptions), $this->getStylesheet($exception));
    }