class Frame

Traits

Resolve source links for consumers that provide a $basePath property.

Properties

protected array<string, string> $editorHrefs

All of the href formats for common editors.

from  ResolvesSourceHref
protected bool $isMain

Whether this frame is the main (first non-vendor) frame.

Methods

string|null
resolveSourceHref(string $file, int|null $line)

Resolve the source href, if possible.

__construct(FlattenException $exception, array $classMap, array $frame, string $basePath, Frame|null $previous = null)

Create a new frame instance.

string
source()

Get the frame's source / origin.

string|null
editorHref()

Get the frame's editor link.

string|null
class()

Get the frame's class, if any.

string
file()

Get the frame's file.

int
line()

Get the frame's line number.

string
operator()

Get the frame's function operator.

string
callable()

Get the frame's function or method.

array
args()

Get the frame's arguments.

string
snippet()

Get the frame's code snippet.

bool
isFromVendor()

Determine if the frame is from the vendor directory.

Frame|null
previous()

Get the previous frame.

void
markAsMain()

Mark this frame as the main frame.

bool
isMain()

Determine if this is the main frame.

Details

in ResolvesSourceHref at line 50
protected string|null resolveSourceHref(string $file, int|null $line)

Resolve the source href, if possible.

Parameters

string $file
int|null $line

Return Value

string|null

at line 28
__construct(FlattenException $exception, array $classMap, array $frame, string $basePath, Frame|null $previous = null)

Create a new frame instance.

Parameters

FlattenException $exception

The "flattened" exception instance

array $classMap

The application's class map

array $frame

The frame's raw data from the flattened exception

string $basePath
Frame|null $previous

at line 40
string source()

Get the frame's source / origin.

Return Value

string

at line 51
string|null editorHref()

Get the frame's editor link.

Return Value

string|null

at line 59
string|null class()

Get the frame's class, if any.

Return Value

string|null

at line 73
string file()

Get the frame's file.

Return Value

string

at line 85
int line()

Get the frame's line number.

Return Value

int

at line 101
string operator()

Get the frame's function operator.

Return Value

string

at line 109
string callable()

Get the frame's function or method.

Return Value

string

at line 120
array args()

Get the frame's arguments.

Return Value

array

at line 139
string snippet()

Get the frame's code snippet.

Return Value

string

at line 157
bool isFromVendor()

Determine if the frame is from the vendor directory.

Return Value

bool

at line 166
Frame|null previous()

Get the previous frame.

Return Value

Frame|null

at line 174
void markAsMain()

Mark this frame as the main frame.

Return Value

void

at line 182
bool isMain()

Determine if this is the main frame.

Return Value

bool