@@ 161-172 (lines=12) @@ | ||
158 | * @param mixed $identifier |
|
159 | * @return mixed |
|
160 | */ |
|
161 | public function get($identifier) |
|
162 | { |
|
163 | $this->rewind(); |
|
164 | while ($this->valid()) { |
|
165 | if ($identifier === $this->getInfo()) { |
|
166 | $object = $this->current(); |
|
167 | $this->rewind(); |
|
168 | return $object; |
|
169 | } |
|
170 | $this->next(); |
|
171 | } |
|
172 | return null; |
|
173 | } |
|
174 | ||
175 | ||
@@ 186-196 (lines=11) @@ | ||
183 | * @param mixed $identifier |
|
184 | * @return bool |
|
185 | */ |
|
186 | public function has($identifier) |
|
187 | { |
|
188 | $this->rewind(); |
|
189 | while ($this->valid()) { |
|
190 | if ($identifier === $this->getInfo()) { |
|
191 | $this->rewind(); |
|
192 | return true; |
|
193 | } |
|
194 | $this->next(); |
|
195 | } |
|
196 | return false; |
|
197 | } |
|
198 | ||
199 | ||
@@ 263-272 (lines=10) @@ | ||
260 | * @param mixed $identifier |
|
261 | * @return boolean |
|
262 | */ |
|
263 | public function setCurrent($identifier) |
|
264 | { |
|
265 | $this->rewind(); |
|
266 | while ($this->valid()) { |
|
267 | if ($identifier === $this->getInfo()) { |
|
268 | return true; |
|
269 | } |
|
270 | $this->next(); |
|
271 | } |
|
272 | return false; |
|
273 | } |
|
274 | ||
275 |