Leaf PHP

FrameCollection
in package
implements IteratorAggregate, Countable

Exposes a fluent interface for dealing with an ordered list of stack-trace frames.

Table of Contents

Interfaces

IteratorAggregate
Countable

Properties

$frames  : array<string|int, array<string|int, mixed>>

Methods

__construct()  : mixed
count()  : int
countIsApplication()  : int
Count the frames that belongs to the application.
filter()  : FrameCollection
Filters frames using a callable, returns the same FrameCollection
getArray()  : array<string|int, mixed>
Returns an array with all frames, does not affect the internal array.
getIterator()  : Traversable
map()  : FrameCollection
Map the collection of frames
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
prependFrames()  : mixed
serialize()  : string
topDiff()  : array<string|int, Frame>
Gets the innermost part of stack trace that is not the same as that of outer exception
unserialize()  : mixed

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $frames) : mixed
Parameters
$frames : array<string|int, mixed>

count()

public count() : int
Tags
see
Countable::count
Return values
int

countIsApplication()

Count the frames that belongs to the application.

public countIsApplication() : int
Return values
int

getArray()

Returns an array with all frames, does not affect the internal array.

public getArray() : array<string|int, mixed>
Tags
todo

If this gets any more complex than this, have getIterator use this method.

see
FrameCollection::getIterator
Return values
array<string|int, mixed>

getIterator()

public getIterator() : Traversable
Tags
see
IteratorAggregate::getIterator
Return values
Traversable

offsetExists()

public offsetExists(int $offset) : bool
Parameters
$offset : int
Tags
see
ArrayAccess::offsetExists
Return values
bool

offsetGet()

public offsetGet(int $offset) : mixed
Parameters
$offset : int
Tags
see
ArrayAccess::offsetGet

offsetSet()

public offsetSet(int $offset, mixed $value) : void
Parameters
$offset : int
$value : mixed
Tags
see
ArrayAccess::offsetSet

offsetUnset()

public offsetUnset(int $offset) : void
Parameters
$offset : int
Tags
see
ArrayAccess::offsetUnset

prependFrames()

public prependFrames(array<string|int, Frame$frames) : mixed
Parameters
$frames : array<string|int, Frame>

Array of Frame instances, usually from $e->getPrevious()

serialize()

public serialize() : string
Tags
see
Serializable::serialize
Return values
string

topDiff()

Gets the innermost part of stack trace that is not the same as that of outer exception

public topDiff(FrameCollection $parentFrames) : array<string|int, Frame>
Parameters
$parentFrames : FrameCollection

Outer exception frames to compare tail against

Return values
array<string|int, Frame>

unserialize()

public unserialize(string $serializedFrames) : mixed
Parameters
$serializedFrames : string
Tags
see
Serializable::unserialize

        
On this page

Search results