1 | <?php |
||
9 | class Collection extends BaseCollection |
||
10 | { |
||
11 | /** |
||
12 | * Cassandra rows instance |
||
13 | * |
||
14 | * @var \Cassandra\Rows |
||
15 | */ |
||
16 | private $rows; |
||
17 | |||
18 | /** |
||
19 | * Set Cassandra rows instance related to the |
||
20 | * collection items. |
||
21 | * |
||
22 | * Required for fetching next pages |
||
23 | * |
||
24 | * @param Rows $rows |
||
25 | * |
||
26 | * @return $this |
||
27 | */ |
||
28 | 56 | public function setRowsInstance(Rows $rows) |
|
34 | |||
35 | /** |
||
36 | * Next page token |
||
37 | * |
||
38 | * @return mixed |
||
39 | */ |
||
40 | 3 | public function getNextPageToken() |
|
48 | |||
49 | /** |
||
50 | * Last page indicator |
||
51 | * @return bool |
||
52 | */ |
||
53 | 6 | public function isLastPage() |
|
61 | |||
62 | /** |
||
63 | * Get next page |
||
64 | * |
||
65 | * @return Collection |
||
66 | */ |
||
67 | 5 | public function nextPage() |
|
81 | |||
82 | /** |
||
83 | * Get rows instance |
||
84 | * |
||
85 | * @return \Cassandra\Rows |
||
86 | */ |
||
87 | 50 | public function getRows() |
|
91 | |||
92 | /** |
||
93 | * Update current collection with results from |
||
94 | * the next page |
||
95 | * |
||
96 | * @return Collection |
||
97 | */ |
||
98 | 2 | public function appendNextPage() |
|
109 | |||
110 | /** |
||
111 | * Merge the collection with the given items. |
||
112 | * |
||
113 | * @param \ArrayAccess|array $items |
||
114 | * @return static |
||
115 | */ |
||
116 | 2 | public function merge($items) |
|
126 | |||
127 | /** |
||
128 | * Reload a fresh model instance from the database for all the entities. |
||
129 | * |
||
130 | * @param array|string $with |
||
131 | * @return static |
||
132 | */ |
||
133 | 4 | public function fresh($with = []) |
|
154 | } |
||
155 |