1 | <?php |
||
19 | trait Pagination |
||
20 | { |
||
21 | abstract protected function httpGet($path, array $parameters = [], array $requestHeaders = []); |
||
22 | |||
23 | abstract protected function safeDeserialize(ResponseInterface $response, $className); |
||
24 | |||
25 | /** |
||
26 | * @param PagingProvider $response |
||
27 | * |
||
28 | * @return PagingProvider|null |
||
29 | */ |
||
30 | public function nextPage(PagingProvider $response) |
||
34 | |||
35 | /** |
||
36 | * @param PagingProvider $response |
||
37 | * |
||
38 | * @return PagingProvider|null |
||
39 | */ |
||
40 | public function previousPage(PagingProvider $response) |
||
44 | |||
45 | /** |
||
46 | * @param PagingProvider $response |
||
47 | * |
||
48 | * @return PagingProvider|null |
||
49 | */ |
||
50 | public function firstPage(PagingProvider $response) |
||
54 | |||
55 | /** |
||
56 | * @param PagingProvider $response |
||
57 | * |
||
58 | * @return PagingProvider|null |
||
59 | */ |
||
60 | public function lastPage(PagingProvider $response) |
||
64 | |||
65 | /** |
||
66 | * @param string $url |
||
67 | * @param string $class |
||
68 | * |
||
69 | * @return PagingProvider|null |
||
70 | */ |
||
71 | private function getPaginationUrl($url, $class) |
||
83 | } |
||
84 |