Leaf PHP

Inspector
in package

Table of Contents

Properties

$exception  : Throwable
$frames  : FrameCollection
$previousExceptionInspector  : Inspector
$previousExceptions  : array<string|int, Throwable>

Methods

__construct()  : mixed
getException()  : Throwable
getExceptionDocrefUrl()  : string|null
Returns a url to the php-manual related to the underlying error - when available.
getExceptionMessage()  : string
getExceptionName()  : string
getFrames()  : FrameCollection
Returns an iterator for the inspected exception's frames.
getPreviousExceptionCodes()  : array<string|int, int>
getPreviousExceptionInspector()  : Inspector
Returns an Inspector for a previous Exception, if any.
getPreviousExceptionMessages()  : array<string|int, string>
getPreviousExceptions()  : array<string|int, Throwable>
Returns an array of all previous exceptions for this inspector's exception
hasPreviousException()  : bool
Does the wrapped Exception has a previous Exception?
getFrameFromError()  : array<string|int, mixed>
Given an error, generates an array in the format generated by ErrorException
getFrameFromException()  : array<string|int, mixed>
Given an exception, generates an array in the format generated by Exception::getTrace()
getTrace()  : array<string|int, mixed>
Gets the backtrace from an exception.
isValidNextFrame()  : bool
Determine if the frame can be used to fill in previous frame's missing info happens for call_user_func and call_user_func_array usages (PHP Bug #44428)
extractDocrefUrl()  : mixed

Properties

$previousExceptions

private array<string|int, Throwable> $previousExceptions

Methods

__construct()

public __construct(Throwable $exception) : mixed
Parameters
$exception : Throwable

The exception to inspect

getException()

public getException() : Throwable
Return values
Throwable

getExceptionDocrefUrl()

Returns a url to the php-manual related to the underlying error - when available.

public getExceptionDocrefUrl() : string|null
Return values
string|null

getExceptionMessage()

public getExceptionMessage() : string
Return values
string

getExceptionName()

public getExceptionName() : string
Return values
string

getPreviousExceptionCodes()

public getPreviousExceptionCodes() : array<string|int, int>
Return values
array<string|int, int>

getPreviousExceptionInspector()

Returns an Inspector for a previous Exception, if any.

public getPreviousExceptionInspector() : Inspector
Tags
todo

Clean this up a bit, cache stuff a bit better.

Return values
Inspector

getPreviousExceptionMessages()

public getPreviousExceptionMessages() : array<string|int, string>
Return values
array<string|int, string>

getPreviousExceptions()

Returns an array of all previous exceptions for this inspector's exception

public getPreviousExceptions() : array<string|int, Throwable>
Return values
array<string|int, Throwable>

hasPreviousException()

Does the wrapped Exception has a previous Exception?

public hasPreviousException() : bool
Return values
bool

getFrameFromError()

Given an error, generates an array in the format generated by ErrorException

protected getFrameFromError(ErrorException $exception) : array<string|int, mixed>
Parameters
$exception : ErrorException
Return values
array<string|int, mixed>

getFrameFromException()

Given an exception, generates an array in the format generated by Exception::getTrace()

protected getFrameFromException(Throwable $exception) : array<string|int, mixed>
Parameters
$exception : Throwable
Return values
array<string|int, mixed>

getTrace()

Gets the backtrace from an exception.

protected getTrace(Throwable $e) : array<string|int, mixed>

If xdebug is installed

Parameters
$e : Throwable
Return values
array<string|int, mixed>

isValidNextFrame()

Determine if the frame can be used to fill in previous frame's missing info happens for call_user_func and call_user_func_array usages (PHP Bug #44428)

protected isValidNextFrame(array<string|int, mixed> $frame) : bool
Parameters
$frame : array<string|int, mixed>
Return values
bool

extractDocrefUrl()

private extractDocrefUrl(mixed $message) : mixed
Parameters
$message : mixed

        
On this page

Search results