| 1 | <?php |
||
| 20 | class PlaceSearchResponseIterator implements \Iterator |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var PlaceSearchService |
||
| 24 | */ |
||
| 25 | private $service; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var PlaceSearchResponse[] |
||
| 29 | */ |
||
| 30 | private $responses = []; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int|null |
||
| 34 | */ |
||
| 35 | private $position = 0; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param PlaceSearchService $service |
||
| 39 | * @param PlaceSearchResponse $response |
||
| 40 | */ |
||
| 41 | public function __construct(PlaceSearchService $service, PlaceSearchResponse $response) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function current() |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritdoc} |
||
| 59 | */ |
||
| 60 | public function next() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * {@inheritdoc} |
||
| 84 | */ |
||
| 85 | public function key() |
||
| 89 | |||
| 90 | /** |
||
| 91 | * {@inheritdoc} |
||
| 92 | */ |
||
| 93 | public function valid() |
||
| 97 | |||
| 98 | /** |
||
| 99 | * {@inheritdoc} |
||
| 100 | */ |
||
| 101 | public function rewind() |
||
| 105 | } |
||
| 106 |