32 $this->frames = array_map(
function ($frame) {
33 return new Frame($frame);
45 $this->frames = array_values(array_filter($this->frames, $callable));
55 public function map($callable)
59 $this->frames = array_map(
function ($frame) use ($callable) {
60 $frame = call_user_func($callable, $frame);
62 if (!$frame instanceof
Frame) {
64 "Callable to " . __METHOD__ .
" must return a Frame object" 103 return isset($this->frames[$offset]);
112 return $this->frames[$offset];
121 throw new \Exception(__CLASS__ .
' is read only');
130 throw new \Exception(__CLASS__ .
' is read only');
139 return count($this->frames);
149 return count(array_filter($this->frames,
function (
Frame $f) {
177 $this->frames = array_merge($frames, $this->frames);
190 $parentFrames = $parentFrames->
getArray();
191 $p =
count($parentFrames)-1;
193 for (
$i =
count($diff)-1;
$i >= 0 && $p >= 0;
$i--) {
195 $tailFrame = $diff[
$i];
196 if ($tailFrame->equals($parentFrames[$p])) {
unserialize($serializedFrames)
offsetSet($offset, $value)
map($callable)
Map the collection of frames.
Exposes a fluent interface for dealing with an ordered list of stack-trace frames.
prependFrames(array $frames)
countIsApplication()
Count the frames that belongs to the application.
__construct(array $frames)
Whoops - php errors for cool kids.
isApplication()
Returns whether this frame belongs to the application or not.
getArray()
Returns an array with all frames, does not affect the internal array.
filter($callable)
Filters frames using a callable, returns the same FrameCollection.