FlattenException
extends FlattenException
in package
FlattenException wraps a PHP Error or Exception to be able to serialize it.
Basically, this class removes all objects from the trace.
Tags
Table of Contents
- $asString : mixed
- $class : mixed
- $code : mixed
- $file : mixed
- $headers : mixed
- $line : mixed
- $message : mixed
- $previous : mixed
- $statusCode : mixed
- $statusText : mixed
- $trace : mixed
- $traceAsString : mixed
- create() : static
- createFromThrowable() : static
- getAllPrevious() : array<string|int, self>
- getAsString() : string
- getClass() : string
- getCode() : int|string
- getFile() : string
- getHeaders() : array<string|int, mixed>
- getLine() : int
- getMessage() : string
- getPrevious() : self|null
- getStatusCode() : int
- getStatusText() : string
- getTrace() : array<string|int, mixed>
- getTraceAsString() : string
- setAsString() : $this
- setClass() : $this
- setCode() : $this
- setFile() : $this
- setHeaders() : $this
- setLine() : $this
- setMessage() : $this
- setPrevious() : $this
- setStatusCode() : $this
- setStatusText() : self
- setTrace() : $this
- setTraceFromException() : mixed
- setTraceFromThrowable() : $this
- toArray() : array<string|int, mixed>
- flattenArgs() : array<string|int, mixed>
- getClassNameFromIncomplete() : string
Properties
$asString
private
mixed
$asString
$class
private
mixed
$class
$code
private
mixed
$code
$file
private
mixed
$file
$headers
private
mixed
$headers
$line
private
mixed
$line
$message
private
mixed
$message
$previous
private
mixed
$previous
$statusCode
private
mixed
$statusCode
$statusText
private
mixed
$statusText
$trace
private
mixed
$trace
$traceAsString
private
mixed
$traceAsString
Methods
create()
public
static create(Exception $exception[, mixed $statusCode = null ][, array<string|int, mixed> $headers = [] ]) : static
Parameters
- $exception : Exception
- $statusCode : mixed = null
- $headers : array<string|int, mixed> = []
Return values
static —createFromThrowable()
public
static createFromThrowable(Throwable $exception[, int $statusCode = null ][, array<string|int, mixed> $headers = [] ]) : static
Parameters
- $exception : Throwable
- $statusCode : int = null
- $headers : array<string|int, mixed> = []
Return values
static —getAllPrevious()
public
getAllPrevious() : array<string|int, self>
Return values
array<string|int, self> —getAsString()
public
getAsString() : string
Return values
string —getClass()
public
getClass() : string
Return values
string —getCode()
public
getCode() : int|string
Return values
int|string —int most of the time (might be a string with PDOException)
getFile()
public
getFile() : string
Return values
string —getHeaders()
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed> —getLine()
public
getLine() : int
Return values
int —getMessage()
public
getMessage() : string
Return values
string —getPrevious()
public
getPrevious() : self|null
Return values
self|null —getStatusCode()
public
getStatusCode() : int
Return values
int —getStatusText()
public
getStatusText() : string
Return values
string —getTrace()
public
getTrace() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTraceAsString()
public
getTraceAsString() : string
Return values
string —setAsString()
public
setAsString(string|null $asString) : $this
Parameters
- $asString : string|null
Return values
$this —setClass()
public
setClass(mixed $class) : $this
Parameters
- $class : mixed
Return values
$this —setCode()
public
setCode(mixed $code) : $this
Parameters
- $code : mixed
Return values
$this —setFile()
public
setFile(mixed $file) : $this
Parameters
- $file : mixed
Return values
$this —setHeaders()
public
setHeaders(array<string|int, mixed> $headers) : $this
Parameters
- $headers : array<string|int, mixed>
Return values
$this —setLine()
public
setLine(mixed $line) : $this
Parameters
- $line : mixed
Return values
$this —setMessage()
public
setMessage(mixed $message) : $this
Parameters
- $message : mixed
Return values
$this —setPrevious()
public
final setPrevious(FlattenException $previous) : $this
Parameters
- $previous : FlattenException
Return values
$this —setStatusCode()
public
setStatusCode(mixed $code) : $this
Parameters
- $code : mixed
Return values
$this —setStatusText()
public
setStatusText(string $statusText) : self
Parameters
- $statusText : string
Return values
self —setTrace()
public
setTrace(mixed $trace, mixed $file, mixed $line) : $this
Parameters
- $trace : mixed
- $file : mixed
- $line : mixed
Return values
$this —setTraceFromException()
public
setTraceFromException(Exception $exception) : mixed
Parameters
- $exception : Exception
Tags
Return values
mixed —setTraceFromThrowable()
public
setTraceFromThrowable(Throwable $throwable) : $this
Parameters
- $throwable : Throwable
Return values
$this —toArray()
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —flattenArgs()
private
flattenArgs(array<string|int, mixed> $args, int $level, int &$count) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed>
- $level : int
- $count : int
Return values
array<string|int, mixed> —getClassNameFromIncomplete()
private
getClassNameFromIncomplete(__PHP_Incomplete_Class $value) : string
Parameters
- $value : __PHP_Incomplete_Class