Symfony\Component\Debug\Exception\FlattenException::getHeaders PHP Method

getHeaders() public method

public getHeaders ( )
    public function getHeaders()
    {
        return $this->headers;
    }

Usage Example

コード例 #1
0
 /**
  * Converts an Exception to a Response.
  *
  * @param  Request          $request
  * @param  FlattenException $exception
  * @return Response
  */
 public function showAction(Request $request, FlattenException $exception)
 {
     if (is_subclass_of($exception->getClass(), 'Pagekit\\Kernel\\Exception\\HttpException')) {
         $title = $exception->getMessage();
     } else {
         $title = __('Whoops, looks like something went wrong.');
     }
     $content = $this->getAndCleanOutputBuffering($request->headers->get('X-Php-Ob-Level', -1));
     $response = App::view('system/error.php', compact('title', 'exception', 'content'));
     return App::response($response, $exception->getCode(), $exception->getHeaders());
 }
All Usage Examples Of Symfony\Component\Debug\Exception\FlattenException::getHeaders