| 1 | <?php |
||
| 9 | class PagedIterator extends AbstractPagedIterator |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | protected $totalSize = -1; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var PrivateClient |
||
| 18 | */ |
||
| 19 | protected $client; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var array |
||
| 23 | */ |
||
| 24 | protected $params; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $endPoint; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var Closure |
||
| 33 | */ |
||
| 34 | protected $translator; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param PrivateClient $client |
||
| 38 | * @param string $endPoint |
||
| 39 | * @param array $params |
||
| 40 | * @param Closure $translator |
||
| 41 | */ |
||
| 42 | 2 | public function __construct(PrivateClient $client, $endPoint, array $params, Closure $translator) |
|
| 49 | |||
| 50 | /** |
||
| 51 | * @return integer |
||
| 52 | */ |
||
| 53 | 1 | public function getPageSize() |
|
| 57 | |||
| 58 | /** |
||
| 59 | * @return integer |
||
| 60 | */ |
||
| 61 | 1 | public function getTotalSize() |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @param integer $pageNumber |
||
| 71 | * @return array |
||
| 72 | */ |
||
| 73 | 1 | public function getPage($pageNumber) |
|
| 81 | } |
||
| 82 |