Documentation

SerializerErrorRenderer
in package
implements ErrorRendererInterface

Formats an exception using Serializer for rendering.

Tags
author

Nicolas Grekas p@tchwork.com

Interfaces, Classes and Traits

ErrorRendererInterface
Formats an exception to be used as response content.

Table of Contents

$debug  : mixed
$fallbackErrorRenderer  : mixed
$format  : mixed
$serializer  : mixed
__construct()  : mixed
getPreferredFormat()  : Closure
render()  : FlattenException
Renders a Throwable as a FlattenException.

Properties

Methods

__construct()

public __construct(SerializerInterface $serializer, string|callable $format[, ErrorRendererInterface|null $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 = null
$debug : bool|callable = false

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

Return values
mixed

Search results