ExceptionController
in package
ExceptionController renders error or exception pages for a given FlattenException.
Tags
Table of Contents
- $debug : mixed
- $twig : mixed
- __construct() : mixed
- showAction() : Response
- Converts an Exception to a Response.
- findTemplate() : string
- getAndCleanOutputBuffering() : string
- templateExists() : mixed
Properties
$debug
protected
mixed
$debug
$twig
protected
mixed
$twig
Methods
__construct()
public
__construct(Environment $twig, bool $debug) : mixed
Parameters
- $twig : Environment
- $debug : bool
-
Show error (false) or exception (true) pages by default
Return values
mixed —showAction()
Converts an Exception to a Response.
public
showAction(Request $request, FlattenException $exception[, DebugLoggerInterface $logger = null ]) : Response
A "showException" request parameter can be used to force display of an error page (when set to false) or the exception page (when true). If it is not present, the "debug" value passed into the constructor will be used.
Parameters
- $request : Request
- $exception : FlattenException
- $logger : DebugLoggerInterface = null
Tags
Return values
Response —findTemplate()
protected
findTemplate(Request $request, string $format, int $code, bool $showException) : string
Parameters
- $request : Request
- $format : string
- $code : int
-
An HTTP response status code
- $showException : bool
Return values
string —getAndCleanOutputBuffering()
protected
getAndCleanOutputBuffering(int $startObLevel) : string
Parameters
- $startObLevel : int
Return values
string —templateExists()
protected
templateExists(mixed $template) : mixed
Parameters
- $template : mixed