svn: /pear2/Pyrus/trunk/src/Pyrus/Channel/ Remotecategory.php
| From: | Brett Bieber | Date: | Thu, 19 Nov 2009 15:24:39 +0000 |
| Subject: | svn: /pear2/Pyrus/trunk/src/Pyrus/Channel/ Remotecategory.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9036@lists.php.net to get a copy of this message | ||
saltybeagle Thu, 19 Nov 2009 15:24:39 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=291005
Log:
Add count() support for a remote category: returns the number packages in that category.
Changed paths:
U pear2/Pyrus/trunk/src/Pyrus/Channel/Remotecategory.php
Modified: pear2/Pyrus/trunk/src/Pyrus/Channel/Remotecategory.php
===================================================================
--- pear2/Pyrus/trunk/src/Pyrus/Channel/Remotecategory.php 2009-11-19 15:19:08 UTC (rev 291004)
+++ pear2/Pyrus/trunk/src/Pyrus/Channel/Remotecategory.php 2009-11-19 15:24:39 UTC (rev 291005)
@@ -24,7 +24,7 @@
* @link http://svn.pear.php.net/wsvn/PEARSVN/Pyrus/
*/
namespace pear2\Pyrus\Channel;
-class Remotecategory implements \ArrayAccess, \Iterator
+class Remotecategory implements \ArrayAccess, \Iterator, \Countable
{
protected $parent;
protected $category;
@@ -148,6 +148,11 @@
}
return false;
}
+
+ function count()
+ {
+ return count($this->packagesinfo);
+ }
function offsetSet($var, $value)
{