1 | <?php |
||
11 | abstract class SimplePaginatedList extends LazyResourceList |
||
12 | { |
||
13 | use PaginatedList; |
||
14 | |||
15 | /* @var integer */ |
||
16 | protected $offset = 0; |
||
17 | |||
18 | /* @var integer */ |
||
19 | protected $limit = 10; |
||
20 | |||
21 | protected function fetchBatch() |
||
40 | |||
41 | protected function fetchData() |
||
47 | |||
48 | protected function onData($data) |
||
55 | |||
56 | /** |
||
57 | * Check if we have the full representation of our data object. |
||
58 | * |
||
59 | * @param \stdClass $data |
||
60 | * |
||
61 | * @return bool |
||
62 | */ |
||
63 | protected function isInitialized($data) |
||
71 | |||
72 | /** |
||
73 | * Total number of resources. |
||
74 | * |
||
75 | * @link http://php.net/manual/en/countable.count.php |
||
76 | * |
||
77 | * @return int |
||
78 | */ |
||
79 | public function count() |
||
87 | |||
88 | /** |
||
89 | * Mutate the pagination limit |
||
90 | * |
||
91 | * @param int $limit Maximum number of items per page (0 - 100) |
||
92 | * @throws \RuntimeException |
||
93 | */ |
||
94 | public function setPaginationLimit($limit) |
||
101 | |||
102 | } |
||
103 |