svn: /pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/ Category.php
[email protected] (Michael Gauthier)
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
gauthierm Tue, 22 Jun 2010 20:42:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300676
Log:
Implement ArrayAccess and Countable for the category proxy object.
Changed paths:
U pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Category.php
Modified: pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Category.php
===================================================================
--- pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Category.php 2010-06-22 20:41:40 UTC (rev 300675)
+++ pear2/sandbox/SimpleChannelFrontend/trunk/src/SimpleChannelFrontend/Category.php 2010-06-22 20:42:23 UTC (rev 300676)
@@ -1,6 +1,6 @@
<?php
namespace PEAR2\SimpleChannelFrontend;
-class Category implements \IteratorAggregate
+class Category implements \IteratorAggregate, \ArrayAccess, \Countable
{
/**
* @var \PEAR2\Pyrus\Channel\RemoteCategory
@@ -27,4 +27,29 @@
{
return $this->_category;
}
+
+ public function offsetExists($key)
+ {
+ return $this->_category->offsetExists($key);
+ }
+
+ public function offsetGet($key)
+ {
+ return $this->_category->offsetGet($key);
+ }
+
+ public function offsetSet($key, $value)
+ {
+ return $this->_category->offsetSet($key, $value);
+ }
+
+ public function offsetUnset($key)
+ {
+ return $this->_category->offsetUnset($key);
+ }
+
+ public function count()
+ {
+ return $this->_category->count();
+ }
}