$container
$container : \Pimple\Container
Container
Error Handler for PHP 7+ Throwables
Enhanced version of \Slim\Handlers\PhpError.
It outputs the error message and diagnostic information in either JSON, XML, or HTML based on the Accept header.
init() : \Charcoal\App\Handler\AbstractHandler
Initialize the AbstractHandler object.
Chainable
setDependencies(\Pimple\Container $container) : \Charcoal\App\Handler\PhpError
Inject dependencies from a Pimple Container.
array $settings
— Slim's settings.\Pimple\Container | $container | A dependencies container instance. |
Chainable
setContainer(\Pimple\Container $container) : \Charcoal\App\Handler\AbstractHandler
Set container for use with the template controller
\Pimple\Container | $container | A dependencies container instance. |
Chainable
setBaseUrl(string|\Psr\Http\Message\UriInterface $url) : \Charcoal\App\Handler\AbstractHandler
Set the base URL (home page).
string|\Psr\Http\Message\UriInterface | $url | A URL to the base URL. |
Chainable
__invoke(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, \Throwable $error) : \Psr\Http\Message\ResponseInterface
Invoke Error Handler
\Psr\Http\Message\ServerRequestInterface | $request | The most recent Request object. |
\Psr\Http\Message\ResponseInterface | $response | The most recent Response object. |
\Throwable | $error | The caught Throwable object. |
setDisplayErrorDetails(boolean $state) : \Charcoal\App\Handler\PhpError
Set whether to display details of the error or a generic message.
boolean | $state | Whether to display error details. |
Chainable
setError(\Throwable $error) : \Charcoal\App\Handler\PhpError
Set the caught error.
\Throwable | $error | The caught Throwable object. |
Chainable