ExceptionDataCollector
extends DataCollector
in package
ExceptionDataCollector.
Tags
Table of Contents
- $data : array<string|int, mixed>|Data
- $cloner : ClonerInterface
- $valueExporter : ValueExporter
- collect() : mixed
- {@inheritdoc}
- getCode() : int
- Gets the exception code.
- getException() : Exception|FlattenException
- Gets the exception.
- getMessage() : string
- Gets the exception message.
- getName() : mixed
- {@inheritdoc}
- getStatusCode() : int
- Gets the status code.
- getTrace() : array<string|int, mixed>
- Gets the exception trace.
- hasException() : bool
- Checks if the exception is not null.
- reset() : mixed
- {@inheritdoc}
- serialize() : mixed
- unserialize() : mixed
- cloneVar() : Data
- Converts the variable into a serializable Data instance.
- getCasters() : array<string|int, callable>
- varToString() : string
- Converts a PHP variable to a string.
Properties
$data
protected
array<string|int, mixed>|Data
$data
= []
$cloner
private
ClonerInterface
$cloner
$valueExporter
private
ValueExporter
$valueExporter
Methods
collect()
{@inheritdoc}
public
collect(Request $request, Response $response[, Exception $exception = null ]) : mixed
Parameters
Return values
mixed —getCode()
Gets the exception code.
public
getCode() : int
Return values
int —The exception code
getException()
Gets the exception.
public
getException() : Exception|FlattenException
Return values
Exception|FlattenException —getMessage()
Gets the exception message.
public
getMessage() : string
Return values
string —The exception message
getName()
{@inheritdoc}
public
getName() : mixed
Return values
mixed —getStatusCode()
Gets the status code.
public
getStatusCode() : int
Return values
int —The status code
getTrace()
Gets the exception trace.
public
getTrace() : array<string|int, mixed>
Return values
array<string|int, mixed> —The exception trace
hasException()
Checks if the exception is not null.
public
hasException() : bool
Return values
bool —true if the exception is not null, false otherwise
reset()
{@inheritdoc}
public
reset() : mixed
Return values
mixed —serialize()
public
serialize() : mixed
Return values
mixed —unserialize()
public
unserialize(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —cloneVar()
Converts the variable into a serializable Data instance.
protected
cloneVar(mixed $var) : Data
This array can be displayed in the template using the VarDumper component.
Parameters
- $var : mixed
Return values
Data —getCasters()
protected
getCasters() : array<string|int, callable>
Return values
array<string|int, callable> —The casters to add to the cloner
varToString()
Converts a PHP variable to a string.
protected
varToString(mixed $var) : string
Parameters
- $var : mixed
-
A PHP variable
Tags
Return values
string —The string representation of the variable