1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

- DibiResultIterator: is countable (thanks to Roman Sklenar)

This commit is contained in:
David Grudl
2009-06-19 11:32:24 +00:00
parent e52cee8cbc
commit 77efc27681

View File

@@ -43,7 +43,7 @@
* @copyright Copyright (c) 2005, 2009 David Grudl
* @package dibi
*/
class DibiResultIterator implements Iterator
class DibiResultIterator implements Iterator, Countable
{
/** @var DibiResult */
private $result;
@@ -133,4 +133,14 @@ class DibiResultIterator implements Iterator
}
/**
* Required by the Countable interface.
* @return int
*/
public function count()
{
return $this->result->getRowCount();
}
}