mirror of
https://github.com/filp/whoops.git
synced 2026-09-12 02:36:20 +00:00
Add Damnit\Exception\Frame
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Damnit - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Damnit\Exception;
|
||||
|
||||
class Frame
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $frame;
|
||||
|
||||
/**
|
||||
* @param array[]
|
||||
*/
|
||||
public function __construct(array $frame)
|
||||
{
|
||||
$this->frame = $frame;
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ use \Countable;
|
||||
* notable aspects is that it is read-only, and instantiates
|
||||
* Frame objects on demand.
|
||||
*/
|
||||
class FrameIterator implements Iterator
|
||||
class FrameIterator implements Iterator, Countable
|
||||
{
|
||||
/**
|
||||
* @var array[]
|
||||
@@ -28,7 +28,7 @@ class FrameIterator implements Iterator
|
||||
{
|
||||
$current = current($this->frames);
|
||||
if($current !== false) {
|
||||
|
||||
return new Frame($current);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user