class FlattenException

FlattenException wraps a PHP Error or Exception to be able to serialize it.

Basically, this class removes all objects from the trace.

Methods

static 
create(Exception $exception, $statusCode = null, array $headers = [])

No description

createFromThrowable(Throwable $exception, int|null $statusCode = null, array $headers = [])

No description

toArray()

No description

getStatusCode()

No description

setStatusCode($code)

No description

getHeaders()

No description

setHeaders(array $headers)

No description

getClass()

No description

setClass($class)

No description

getFile()

No description

setFile($file)

No description

getLine()

No description

setLine($line)

No description

getMessage()

No description

setMessage($message)

No description

getCode()

No description

setCode($code)

No description

getPrevious()

No description

setPrevious(FlattenException $previous)

No description

getAllPrevious()

No description

getTrace()

No description

setTraceFromException(Exception $exception) deprecated

No description

void
setTraceFromThrowable(Throwable $throwable)

No description

setTrace($trace, $file, $line)

No description

Details

at line 36
static create(Exception $exception, $statusCode = null, array $headers = [])

Parameters

Exception $exception
$statusCode
array $headers

at line 41
static FlattenException createFromThrowable(Throwable $exception, int|null $statusCode = null, array $headers = [])

Parameters

Throwable $exception
int|null $statusCode
array $headers

Return Value

FlattenException

at line 74
toArray()

at line 88
getStatusCode()

at line 93
setStatusCode($code)

Parameters

$code

at line 98
getHeaders()

at line 103
setHeaders(array $headers)

Parameters

array $headers

at line 108
getClass()

at line 113
setClass($class)

Parameters

$class

at line 118
getFile()

at line 123
setFile($file)

Parameters

$file

at line 128
getLine()

at line 133
setLine($line)

Parameters

$line

at line 138
getMessage()

at line 143
setMessage($message)

Parameters

$message

at line 148
getCode()

at line 153
setCode($code)

Parameters

$code

at line 158
getPrevious()

at line 163
setPrevious(FlattenException $previous)

Parameters

FlattenException $previous

at line 168
getAllPrevious()

at line 179
getTrace()

at line 187
setTraceFromException(Exception $exception) deprecated

deprecated since 4.1, use {@see setTraceFromThrowable()} instead.

Parameters

Exception $exception

at line 194
void setTraceFromThrowable(Throwable $throwable)

Parameters

Throwable $throwable

Return Value

void

at line 199
setTrace($trace, $file, $line)

Parameters

$trace
$file
$line