PEAR2_SimpleChannelFrontendPEAR2_SimpleChannelFrontend-0.2.0/php/PEAR2/SimpleChannelFrontend/Category.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace PEAR2\SimpleChannelFrontend;
class Category implements \IteratorAggregate, \ArrayAccess, \Countable
{
    /**
     * @var \PEAR2\Pyrus\Channel\RemoteCategory
     */
    protected $_category;

    public function __construct($options = array())
    {
        $channel = $options['frontend']->getChannel();
        $this->_category = $channel->remotecategories[$options['category']];
        $this->rewind();
    }

    public function __get($var)
    {
        return $this->_category->$var;
    }

    public function __call($method, $args)
    {
        return call_user_func_array(array($this->_category, $method), $args);
    }

    public function getIterator()
    {
        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();
    }
}
EOF