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 = array())

No description

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

No description

toArray()

No description

getStatusCode()

No description

$this
setStatusCode($code)

No description

getHeaders()

No description

$this
setHeaders(array $headers)

No description

getClass()

No description

$this
setClass($class)

No description

getFile()

No description

$this
setFile($file)

No description

getLine()

No description

$this
setLine($line)

No description

getMessage()

No description

$this
setMessage($message)

No description

getCode()

No description

$this
setCode($code)

No description

getPrevious()

No description

$this
setPrevious(FlattenException $previous)

No description

getAllPrevious()

No description

getTrace()

No description

setTraceFromException(Exception $exception) deprecated

No description

setTraceFromThrowable(Throwable $throwable)

No description

$this
setTrace($trace, $file, $line)

No description

Details

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

Parameters

Exception $exception
$statusCode
array $headers

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

Parameters

Throwable $exception
int|null $statusCode
array $headers

Return Value

FlattenException

at line 74
toArray()

at line 88
getStatusCode()

at line 96
$this setStatusCode($code)

Parameters

$code

Return Value

$this

at line 103
getHeaders()

at line 111
$this setHeaders(array $headers)

Parameters

array $headers

Return Value

$this

at line 118
getClass()

at line 126
$this setClass($class)

Parameters

$class

Return Value

$this

at line 133
getFile()

at line 141
$this setFile($file)

Parameters

$file

Return Value

$this

at line 148
getLine()

at line 156
$this setLine($line)

Parameters

$line

Return Value

$this

at line 163
getMessage()

at line 171
$this setMessage($message)

Parameters

$message

Return Value

$this

at line 184
getCode()

at line 192
$this setCode($code)

Parameters

$code

Return Value

$this

at line 199
getPrevious()

at line 207
$this setPrevious(FlattenException $previous)

Parameters

FlattenException $previous

Return Value

$this

at line 214
getAllPrevious()

at line 225
getTrace()

at line 233
setTraceFromException(Exception $exception) deprecated

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

Parameters

Exception $exception

at line 240
setTraceFromThrowable(Throwable $throwable)

Parameters

Throwable $throwable

at line 248
$this setTrace($trace, $file, $line)

Parameters

$trace
$file
$line

Return Value

$this