ExceptionCaster
in package
Casts common Exception classes to array representation.
Tags
Table of Contents
- $errorTypes : mixed
- $srcContext : mixed
- $traceArgs : mixed
- $framesCache : mixed
- castError() : mixed
- castErrorException() : mixed
- castException() : mixed
- castFrameStub() : mixed
- castSilencedErrorContext() : mixed
- castThrowingCasterException() : mixed
- castTraceStub() : mixed
- extractSource() : EnumStub
- filterExceptionArray() : array<string|int, mixed>
- traceUnshift() : void
Properties
$errorTypes
public
static mixed
$errorTypes
= [E_DEPRECATED => 'E_DEPRECATED', E_USER_DEPRECATED => 'E_USER_DEPRECATED', E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', E_ERROR => 'E_ERROR', E_WARNING => 'E_WARNING', E_PARSE => 'E_PARSE', E_NOTICE => 'E_NOTICE', E_CORE_ERROR => 'E_CORE_ERROR', E_CORE_WARNING => 'E_CORE_WARNING', E_COMPILE_ERROR => 'E_COMPILE_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_USER_WARNING => 'E_USER_WARNING', E_USER_NOTICE => 'E_USER_NOTICE', E_STRICT => 'E_STRICT']
$srcContext
public
static mixed
$srcContext
= 1
$traceArgs
public
static mixed
$traceArgs
= true
$framesCache
private
static mixed
$framesCache
= []
Methods
castError()
public
static castError(Error $e, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
- $e : Error
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
- $filter : int
Return values
mixed —castErrorException()
public
static castErrorException(ErrorException $e, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $e : ErrorException
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castException()
public
static castException(Exception $e, array<string|int, mixed> $a, Stub $stub, bool $isNested, int $filter) : mixed
Parameters
- $e : Exception
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
- $filter : int
Return values
mixed —castFrameStub()
public
static castFrameStub(FrameStub $frame, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
Return values
mixed —castSilencedErrorContext()
public
static castSilencedErrorContext(SilencedErrorContext $e, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $e : SilencedErrorContext
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castThrowingCasterException()
public
static castThrowingCasterException(ThrowingCasterException $e, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
- $e : ThrowingCasterException
- $a : array<string|int, mixed>
- $stub : Stub
- $isNested : bool
Return values
mixed —castTraceStub()
public
static castTraceStub(TraceStub $trace, array<string|int, mixed> $a, Stub $stub, bool $isNested) : mixed
Parameters
Return values
mixed —extractSource()
private
static extractSource(string $srcLines, int $line, int $srcContext, string $lang, string|null $file, array<string|int, mixed> $frame) : EnumStub
Parameters
- $srcLines : string
- $line : int
- $srcContext : int
- $lang : string
- $file : string|null
- $frame : array<string|int, mixed>
Return values
EnumStub —filterExceptionArray()
private
static filterExceptionArray(string $xClass, array<string|int, mixed> $a, string $xPrefix, int $filter) : array<string|int, mixed>
Parameters
- $xClass : string
- $a : array<string|int, mixed>
- $xPrefix : string
- $filter : int
Return values
array<string|int, mixed> —traceUnshift()
private
static traceUnshift(array<string|int, mixed> &$trace, string|null $class, string $file, int $line) : void
Parameters
- $trace : array<string|int, mixed>
- $class : string|null
- $file : string
- $line : int