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));
    }
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));
    }
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 ) ) ; }
Sends the error associated with the given Exception as a plain PHP response.

This method uses plain PHP functions like header() and echo to output
the response.

@param \Exception|FlattenException $exception An \Exception instance
Sends the error associated with the given Exception as a plain PHP response .