32 $this->frames = array_map(
function ($frame) {
33 return new Frame($frame);
45 $this->frames = 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);
165 $this->frames = array_merge($frames, $this->frames);
178 $parentFrames = $parentFrames->
getArray();
179 $p =
count($parentFrames)-1;
181 for ($i =
count($diff)-1; $i >= 0 && $p >= 0; $i--) {
183 $tailFrame = $diff[$i];
184 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)
__construct(array $frames)
Whoops - php errors for cool kids.
getArray()
Returns an array with all frames, does not affect the internal array.
filter($callable)
Filters frames using a callable, returns the same FrameCollection.