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
$exception
private
Throwable
$exception
$frames
private
FrameCollection
$frames
$previousExceptionInspector
private
Inspector
$previousExceptionInspector
$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
ThrowablegetExceptionDocrefUrl()
Returns a url to the php-manual related to the underlying error - when available.
public
getExceptionDocrefUrl() : string|null
Return values
string|nullgetExceptionMessage()
public
getExceptionMessage() : string
Return values
stringgetExceptionName()
public
getExceptionName() : string
Return values
stringgetFrames()
Returns an iterator for the inspected exception's frames.
public
getFrames() : FrameCollection
Return values
FrameCollectiongetPreviousExceptionCodes()
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
Return values
InspectorgetPreviousExceptionMessages()
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
boolgetFrameFromError()
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
boolextractDocrefUrl()
private
extractDocrefUrl(mixed $message) : mixed
Parameters
- $message : mixed