@@ 176-185 (lines=10) @@ | ||
173 | /** |
|
174 | * {@inheritDoc} |
|
175 | */ |
|
176 | public function exists(Closure $p) |
|
177 | { |
|
178 | foreach ($this->elements as $key => $element) { |
|
179 | if ($p($key, $element)) { |
|
180 | return true; |
|
181 | } |
|
182 | } |
|
183 | ||
184 | return false; |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * {@inheritDoc} |
|
@@ 282-291 (lines=10) @@ | ||
279 | /** |
|
280 | * {@inheritDoc} |
|
281 | */ |
|
282 | public function forAll(Closure $p) |
|
283 | { |
|
284 | foreach ($this->elements as $key => $element) { |
|
285 | if (!$p($key, $element)) { |
|
286 | return false; |
|
287 | } |
|
288 | } |
|
289 | ||
290 | return true; |
|
291 | } |
|
292 | ||
293 | /** |
|
294 | * {@inheritDoc} |