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

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

Parameters

Exception $exception
$statusCode
array $headers

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

Parameters

Throwable $exception
int|null $statusCode
array $headers

Return Value

FlattenException

toArray()

getStatusCode()

$this setStatusCode($code)

Parameters

$code

Return Value

$this

getHeaders()

$this setHeaders(array $headers)

Parameters

array $headers

Return Value

$this

getClass()

$this setClass($class)

Parameters

$class

Return Value

$this

getFile()

$this setFile($file)

Parameters

$file

Return Value

$this

getLine()

$this setLine($line)

Parameters

$line

Return Value

$this

getMessage()

$this setMessage($message)

Parameters

$message

Return Value

$this

getCode()

$this setCode($code)

Parameters

$code

Return Value

$this

getPrevious()

$this setPrevious(FlattenException $previous)

Parameters

FlattenException $previous

Return Value

$this

getAllPrevious()

getTrace()

setTraceFromException(Exception $exception) deprecated

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

Parameters

Exception $exception

setTraceFromThrowable(Throwable $throwable)

Parameters

Throwable $throwable

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

Parameters

$trace
$file
$line

Return Value

$this