Add Damnit\Exception\Frame

This commit is contained in:
filp
2013-03-12 11:09:56 +00:00
parent cc08c06946
commit 6ce89996fe
2 changed files with 25 additions and 2 deletions
+23
View File
@@ -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;
}
}
+2 -2
View File
@@ -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;