1 | <?php |
||
8 | class EntityIterator implements \Countable, \Iterator, \ArrayAccess |
||
9 | { |
||
10 | /** @var array */ |
||
11 | protected $data; |
||
12 | /** @var int */ |
||
13 | protected $cursor = -1; |
||
14 | /** @var Entity */ |
||
15 | protected $current; |
||
16 | /** @var Response */ |
||
17 | protected $response; |
||
18 | |||
19 | 190 | public function __construct(array $objects, Response $response) |
|
25 | |||
26 | /** |
||
27 | * Returns the original response |
||
28 | * @return Response |
||
29 | */ |
||
30 | 3 | public function getResponse() |
|
34 | |||
35 | 5 | public function count() |
|
39 | |||
40 | 173 | public function rewind() |
|
47 | |||
48 | 94 | public function key() |
|
52 | |||
53 | 178 | public function current() |
|
60 | |||
61 | 190 | public function next() |
|
65 | |||
66 | 173 | public function valid() |
|
74 | |||
75 | 5 | protected function _getZerothEntity() |
|
79 | |||
80 | 6 | public function __call($name, $args) |
|
98 | |||
99 | 1 | public function __get($name) |
|
105 | |||
106 | /** |
||
107 | * (PHP 5 >= 5.0.0)<br/> |
||
108 | * Whether a offset exists |
||
109 | * @link http://php.net/manual/en/arrayaccess.offsetexists.php |
||
110 | * @param mixed $offset <p> |
||
111 | * An offset to check for. |
||
112 | * </p> |
||
113 | * @return boolean true on success or false on failure. |
||
114 | * </p> |
||
115 | * <p> |
||
116 | * The return value will be casted to boolean if non-boolean was returned. |
||
117 | */ |
||
118 | 178 | public function offsetExists($offset) |
|
122 | |||
123 | /** |
||
124 | * (PHP 5 >= 5.0.0)<br/> |
||
125 | * Offset to retrieve |
||
126 | * @link http://php.net/manual/en/arrayaccess.offsetget.php |
||
127 | * @param mixed $offset <p> |
||
128 | * The offset to retrieve. |
||
129 | * </p> |
||
130 | * @return mixed Can return all value types. |
||
131 | */ |
||
132 | public function offsetGet($offset) |
||
139 | |||
140 | /** |
||
141 | * (PHP 5 >= 5.0.0)<br/> |
||
142 | * Offset to set |
||
143 | * @link http://php.net/manual/en/arrayaccess.offsetset.php |
||
144 | * @param mixed $offset <p> |
||
145 | * The offset to assign the value to. |
||
146 | * </p> |
||
147 | * @param mixed $value <p> |
||
148 | * The value to set. |
||
149 | * </p> |
||
150 | * @return void |
||
151 | */ |
||
152 | public function offsetSet($offset, $value) |
||
158 | |||
159 | /** |
||
160 | * (PHP 5 >= 5.0.0)<br/> |
||
161 | * Offset to unset |
||
162 | * @link http://php.net/manual/en/arrayaccess.offsetunset.php |
||
163 | * @param mixed $offset <p> |
||
164 | * The offset to unset. |
||
165 | * </p> |
||
166 | * @return void |
||
167 | */ |
||
168 | public function offsetUnset($offset) |
||
172 | } |