ErrorTraceDto
extends BaseDto
in package
PHP Mini Framework
Tags
Table of Contents
- $class : string
- $file : string
- $function : string
- $line : string
- __construct() : mixed
- load() : self
- Load data from array
- parseType() : mixed
- Parse object type
- resolveType() : string
- Resolve data type
- toArray() : array<string|int, mixed>
- Get array response data
- with() : static
- Load dto with array
Properties
$class
public
string
$class
Tags
$file
public
string
$file
Tags
$function
public
string
$function
Tags
$line
public
string
$line
Tags
Methods
__construct()
public
__construct([array<string|int, mixed> $trace = [] ]) : mixed
Parameters
- $trace : array<string|int, mixed> = []
-
Instance of Error Trace
- file
- line
- class
- function
Tags
Return values
mixed —load()
Load data from array
public
load(array<string|int, mixed> $data[, bool $force = false ]) : self
Parameters
- $data : array<string|int, mixed>
- $force : bool = false
Tags
Return values
self —parseType()
Parse object type
public
static parseType(ReflectionUnionType|ReflectionNamedType|ReflectionType|string $type, mixed $data) : mixed
Parameters
- $type : ReflectionUnionType|ReflectionNamedType|ReflectionType|string
- $data : mixed
Tags
Return values
mixed —resolveType()
Resolve data type
public
static resolveType(mixed $data[, array<string|int, ReflectionNamedType> $types = [] ]) : string
Parameters
- $data : mixed
- $types : array<string|int, ReflectionNamedType> = []
Tags
Return values
string —toArray()
Get array response data
public
toArray([bool $trim = true ]) : array<string|int, mixed>
Parameters
- $trim : bool = true
-
Remove NULL properties
Tags
Return values
array<string|int, mixed> —with()
Load dto with array
public
static with(array<string|int, mixed>|object|null $data) : static
Parameters
- $data : array<string|int, mixed>|object|null