@@ 117-128 (lines=12) @@ | ||
114 | * @param mixed $identifier |
|
115 | * @return mixed |
|
116 | */ |
|
117 | public function get($identifier) |
|
118 | { |
|
119 | $this->rewind(); |
|
120 | while ($this->valid()) { |
|
121 | if ($identifier === $this->getInfo()) { |
|
122 | $object = $this->current(); |
|
123 | $this->rewind(); |
|
124 | return $object; |
|
125 | } |
|
126 | $this->next(); |
|
127 | } |
|
128 | return null; |
|
129 | } |
|
130 | ||
131 | ||
@@ 142-152 (lines=11) @@ | ||
139 | * @param mixed $identifier |
|
140 | * @return bool |
|
141 | */ |
|
142 | public function has($identifier) |
|
143 | { |
|
144 | $this->rewind(); |
|
145 | while ($this->valid()) { |
|
146 | if ($identifier === $this->getInfo()) { |
|
147 | $this->rewind(); |
|
148 | return true; |
|
149 | } |
|
150 | $this->next(); |
|
151 | } |
|
152 | return false; |
|
153 | } |
|
154 | ||
155 | ||
@@ 219-228 (lines=10) @@ | ||
216 | * @param mixed $identifier |
|
217 | * @return boolean |
|
218 | */ |
|
219 | public function setCurrent($identifier) |
|
220 | { |
|
221 | $this->rewind(); |
|
222 | while ($this->valid()) { |
|
223 | if ($identifier === $this->getInfo()) { |
|
224 | return true; |
|
225 | } |
|
226 | $this->next(); |
|
227 | } |
|
228 | return false; |
|
229 | } |
|
230 | ||
231 |