ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Default Slim application error handler for PHP 7+ Throwables. More...
Public Member Functions | |
__invoke (ServerRequestInterface $request, ResponseInterface $response, \Throwable $error) | |
Invoke error handler. More... | |
Public Member Functions inherited from Slim\Handlers\AbstractError | |
__construct ($displayErrorDetails=false) | |
Constructor. More... | |
Protected Member Functions | |
renderHtmlErrorMessage (\Throwable $error) | |
Render HTML error page. More... | |
renderHtmlError (\Throwable $error) | |
Render error as HTML. More... | |
renderJsonErrorMessage (\Throwable $error) | |
Render JSON error. More... | |
renderXmlErrorMessage (\Throwable $error) | |
Render XML error. More... | |
Protected Member Functions inherited from Slim\Handlers\AbstractError | |
writeToErrorLog ($throwable) | |
Write to the error log if displayErrorDetails is false. More... | |
renderThrowableAsText ($throwable) | |
Render error as Text. More... | |
logError ($message) | |
Wraps the error_log function so that this can be easily tested. More... | |
Protected Member Functions inherited from Slim\Handlers\AbstractHandler | |
determineContentType (ServerRequestInterface $request) | |
Determine which content type we know about is wanted using Accept header. More... | |
Private Member Functions | |
createCdataSection ($content) | |
Returns a CDATA section with the given content. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Slim\Handlers\AbstractError | |
$displayErrorDetails | |
Protected Attributes inherited from Slim\Handlers\AbstractHandler | |
$knownContentTypes | |
Default Slim application error handler for PHP 7+ Throwables.
It outputs the error message and diagnostic information in either JSON, XML, or HTML based on the Accept header.
Definition at line 22 of file PhpError.php.
Slim\Handlers\PhpError::__invoke | ( | ServerRequestInterface | $request, |
ResponseInterface | $response, | ||
\Throwable | $error | ||
) |
Invoke error handler.
ServerRequestInterface | $request | The most recent Request object |
ResponseInterface | $response | The most recent Response object |
\Throwable | $error | The caught Throwable object |
UnexpectedValueException |
Definition at line 34 of file PhpError.php.
References $contentType, $output, Slim\Handlers\AbstractHandler\determineContentType(), Slim\Handlers\PhpError\renderHtmlErrorMessage(), Slim\Handlers\PhpError\renderJsonErrorMessage(), Slim\Handlers\PhpError\renderXmlErrorMessage(), Psr\Http\Message\ResponseInterface\withStatus(), and Slim\Handlers\AbstractError\writeToErrorLog().
|
private |
Returns a CDATA section with the given content.
string | $content |
Definition at line 201 of file PhpError.php.
Referenced by Slim\Handlers\PhpError\renderXmlErrorMessage().
|
protected |
Render error as HTML.
\Throwable | $error |
Definition at line 109 of file PhpError.php.
References $code, $file, $html, and $message.
Referenced by Slim\Handlers\PhpError\renderHtmlErrorMessage().
|
protected |
Render HTML error page.
\Throwable | $error |
Definition at line 72 of file PhpError.php.
References $html, $output, $title, and Slim\Handlers\PhpError\renderHtmlError().
Referenced by Slim\Handlers\PhpError\__invoke().
|
protected |
Render JSON error.
\Throwable | $error |
Definition at line 144 of file PhpError.php.
Referenced by Slim\Handlers\PhpError\__invoke().
|
protected |
Render XML error.
\Throwable | $error |
Definition at line 175 of file PhpError.php.
References $xml, and Slim\Handlers\PhpError\createCdataSection().
Referenced by Slim\Handlers\PhpError\__invoke().