| 1 | <?php |
||
| 8 | class AnyAccessor extends Accessor |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Checks if the $iterator returns a truey value for ANY element of a collection. |
||
| 12 | * The function returns as soon as it finds a passing value and does not iterate |
||
| 13 | * over entire collection. |
||
| 14 | * |
||
| 15 | * Returns boolean |
||
| 16 | * |
||
| 17 | * @param Collection $collection |
||
| 18 | * @param callable $iterator |
||
| 19 | * @return Collection |
||
| 20 | */ |
||
| 21 | public function __invoke($collection, $iterator) |
||
| 33 | } |
||
| 34 |