FlattenException
extends FlattenException
in package
FinalYes
FlattenException wraps a PHP Error or Exception to be able to serialize it.
Tags
Table of Contents
Properties
- $asString : string|null
- $class : string
- $code : string|int
- $context : ExceptionContext|null
- $file : string
- $headers : array<string|int, mixed>
- $line : int
- $message : string
- $previous : self|null
- $statusCode : int
- $statusText : string
- $trace : array<string|int, mixed>
- $traceAsString : string
Methods
- create() : static
- createFromThrowable() : static
- getAllPrevious() : array<string|int, self>
- getAsString() : string
- getClass() : string
- getCode() : int|string
- getDebugMessage() : string
- getFile() : string
- getHeaders() : array<string|int, mixed>
- getLine() : int
- getMessage() : string
- getParameters() : array<string|int, mixed>
- getPrevious() : self|null
- getPublicMessage() : string
- getStatusCode() : int
- getStatusText() : string
- getTrace() : array<string|int, mixed>
- getTraceAsString() : string
- getTranslationParameters() : array<string|int, mixed>
- setAsString() : $this
- setClass() : $this
- setCode() : $this
- setFile() : $this
- setHeaders() : $this
- setLine() : $this
- setMessage() : $this
- setPrevious() : $this
- setStatusCode() : $this
- setStatusText() : $this
- setTrace() : $this
- setTraceFromThrowable() : $this
- toArray() : array<string|int, mixed>
- flattenArgs() : array<string|int, mixed>
- getClassNameFromIncomplete() : string
Properties
$asString
private
string|null
$asString
= null
$class
private
string
$class
$code
private
string|int
$code
$context
private
ExceptionContext|null
$context
= null
$file
private
string
$file
$headers
private
array<string|int, mixed>
$headers
$line
private
int
$line
$message
private
string
$message
$previous
private
self|null
$previous
= null
$statusCode
private
int
$statusCode
$statusText
private
string
$statusText
$trace
private
array<string|int, mixed>
$trace
$traceAsString
private
string
$traceAsString
Methods
create()
public
static create(Exception $exception[, int|null $statusCode = null ][, array<string|int, mixed> $headers = [] ]) : static
Parameters
- $exception : Exception
- $statusCode : int|null = null
- $headers : array<string|int, mixed> = []
Return values
staticcreateFromThrowable()
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
staticgetAllPrevious()
public
getAllPrevious() : array<string|int, self>
Return values
array<string|int, self>getAsString()
public
getAsString() : string
Return values
stringgetClass()
public
getClass() : string
Return values
stringgetCode()
public
getCode() : int|string
Return values
int|string —int most of the time (might be a string with PDOException)
getDebugMessage()
public
getDebugMessage() : string
Return values
stringgetFile()
public
getFile() : string
Return values
stringgetHeaders()
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>getLine()
public
getLine() : int
Return values
intgetMessage()
public
getMessage() : string
Return values
stringgetParameters()
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getPrevious()
public
getPrevious() : self|null
Return values
self|nullgetPublicMessage()
public
getPublicMessage() : string
Return values
stringgetStatusCode()
public
getStatusCode() : int
Return values
intgetStatusText()
public
getStatusText() : string
Return values
stringgetTrace()
public
getTrace() : array<string|int, mixed>
Return values
array<string|int, mixed>getTraceAsString()
public
getTraceAsString() : string
Return values
stringgetTranslationParameters()
public
getTranslationParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>setAsString()
public
setAsString(string|null $asString) : $this
Parameters
- $asString : string|null
Return values
$thissetClass()
public
setClass(string $class) : $this
Parameters
- $class : string
Return values
$thissetCode()
public
setCode(int|string $code) : $this
Parameters
- $code : int|string
Return values
$thissetFile()
public
setFile(string $file) : $this
Parameters
- $file : string
Return values
$thissetHeaders()
public
setHeaders(array<string|int, mixed> $headers) : $this
Parameters
- $headers : array<string|int, mixed>
Return values
$thissetLine()
public
setLine(int $line) : $this
Parameters
- $line : int
Return values
$thissetMessage()
public
setMessage(string $message) : $this
Parameters
- $message : string
Return values
$thissetPrevious()
public
setPrevious(self|null $previous) : $this
Parameters
- $previous : self|null
Return values
$thissetStatusCode()
public
setStatusCode(int $code) : $this
Parameters
- $code : int
Return values
$thissetStatusText()
public
setStatusText(string $statusText) : $this
Parameters
- $statusText : string
Return values
$thissetTrace()
public
setTrace(array<string|int, mixed> $trace, string|null $file, int|null $line) : $this
Parameters
- $trace : array<string|int, mixed>
- $file : string|null
- $line : int|null
Return values
$thissetTraceFromThrowable()
public
setTraceFromThrowable(Throwable $throwable) : $this
Parameters
- $throwable : Throwable
Return values
$thistoArray()
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>flattenArgs()
private
flattenArgs(array<string|int, mixed> $args[, int $level = 0 ][, int &$count = 0 ]) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed>
- $level : int = 0
- $count : int = 0
Return values
array<string|int, mixed>getClassNameFromIncomplete()
private
getClassNameFromIncomplete(__PHP_Incomplete_Class $value) : string
Parameters
- $value : __PHP_Incomplete_Class