projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3f34fc
)
Implement Countable.
author
Jan Schneider
<jan@horde.org>
Fri, 28 Aug 2009 21:08:59 +0000
(23:08 +0200)
committer
Jan Schneider
<jan@horde.org>
Fri, 28 Aug 2009 21:09:20 +0000
(23:09 +0200)
framework/Rdo/lib/Horde/Rdo/List.php
patch
|
blob
|
history
diff --git
a/framework/Rdo/lib/Horde/Rdo/List.php
b/framework/Rdo/lib/Horde/Rdo/List.php
index
212878e
..
5f7ad9d
100644
(file)
--- a/
framework/Rdo/lib/Horde/Rdo/List.php
+++ b/
framework/Rdo/lib/Horde/Rdo/List.php
@@
-12,7
+12,7
@@
* @category Horde
* @package Horde_Rdo
*/
-class Horde_Rdo_List implements Iterator
+class Horde_Rdo_List implements Iterator
, Countable
{
/**
* Rdo Mapper
@@
-190,4
+190,17
@@
class Horde_Rdo_List implements Iterator
return !$this->_eof;
}
+ /**
+ * Returns the number of objects.
+ *
+ * @return integer
+ */
+ public function count()
+ {
+ if (is_null($this->_result)) {
+ $this->rewind();
+ }
+ return $this->_mapper->adapter->count();
+ }
+
}