ErrorHandler
in package
Error handler
Table of Contents
Properties
- $container : ContainerInterface|null
- Container
- $renderer : ErrorHandlerInterface|null
- Error renderer
Methods
- __construct() : mixed
- Constructor
- handleError() : void
- Handle php app errors
- redirectToInstallPage() : ResponseInterface
- Redirect to install page
- renderExecption() : ResponseInterface
- Render exception
- resolveRenderer() : void
- Create renderer if not set
Properties
$container
Container
protected
ContainerInterface|null
$container
= null
$renderer
Error renderer
protected
ErrorHandlerInterface|null
$renderer
= null
Methods
__construct()
Constructor
public
__construct([ContainerInterface|null $container = null ][, object|null $renderer = null ]) : mixed
Parameters
- $container : ContainerInterface|null = null
- $renderer : object|null = null
handleError()
Handle php app errors
public
handleError(mixed $num, mixed $message, mixed $file, mixed $line) : void
Parameters
- $num : mixed
- $message : mixed
- $file : mixed
- $line : mixed
redirectToInstallPage()
Redirect to install page
public
redirectToInstallPage(ResponseInterface $response) : ResponseInterface
Parameters
- $response : ResponseInterface
Return values
ResponseInterfacerenderExecption()
Render exception
public
renderExecption(Throwable $exception, ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface
Parameters
- $exception : Throwable
- $request : ServerRequestInterface
- $response : ResponseInterface
Return values
ResponseInterfaceresolveRenderer()
Create renderer if not set
private
resolveRenderer() : void