Documentation

SerializerErrorRenderer
in package
implements ErrorRendererInterface

Formats an exception using Serializer for rendering.

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

Interfaces

ErrorRendererInterface
Formats an exception to be used as response content.

Properties

$debug  : bool|Closure
$fallbackErrorRenderer  : mixed
$format  : string|Closure
$serializer  : mixed

Methods

__construct()  : mixed
getPreferredFormat()  : Closure
render()  : FlattenException
Renders a Throwable as a FlattenException.

Properties

Methods

__construct()

public __construct(SerializerInterface $serializer, string|callable $format[, ErrorRendererInterface $fallbackErrorRenderer = null ][, bool|callable $debug = false ]) : mixed
Parameters
$serializer : SerializerInterface
$format : string|callable

The format as a string or a callable that should return it formats not supported by Request::getMimeTypes() should be given as mime types

$fallbackErrorRenderer : ErrorRendererInterface = null
$debug : bool|callable = false

The debugging mode as a boolean or a callable that should return it


        
On this page

Search results