HtmlErrorRenderer
in package
implements
ErrorRendererInterface
Interactive HTML error rendering with a stack trace.
Default output renderer for non CLI SAPI.
Table of Contents
Interfaces
- ErrorRendererInterface
- Interface for PHP error rendering implementations
Methods
- render() : string
- Render output for the provided error.
- write() : void
- Write output to the renderer's output stream
- renderToggle() : string
- Render a toggle link in the error content.
Methods
render()
Render output for the provided error.
public
render(PhpError $error, bool $debug) : string
Parameters
- $error : PhpError
-
The error to be rendered.
- $debug : bool
-
Whether or not the application is in debug mode.
Tags
Return values
string —The output to be echoed.
write()
Write output to the renderer's output stream
public
write(string $out) : void
Parameters
- $out : string
-
The content to output.
Tags
renderToggle()
Render a toggle link in the error content.
private
renderToggle(string $text, string $id, string $suffix) : string
Parameters
- $text : string
-
The text to insert. Assumed to be HTML safe.
- $id : string
-
The error id scope.
- $suffix : string
-
The element selector.