1 | <?php |
||
14 | abstract class Listview extends Collection { |
||
15 | |||
16 | /** |
||
17 | * Get the basic select query |
||
18 | */ |
||
19 | |||
20 | private function getBasicSelectQuery(array $config, array $order_by, int $index, int $display) : string { |
||
32 | |||
33 | /** |
||
34 | * Get the nesting select query |
||
35 | */ |
||
36 | |||
37 | private function getNestingSelectQuery(int $parent_id, array $config, array $order_by, int $index, int $display) : string { |
||
55 | |||
56 | /** |
||
57 | * Get the basic count query |
||
58 | */ |
||
59 | |||
60 | private function getBasicCountQuery(array $config) : string { |
||
66 | |||
67 | /** |
||
68 | * Get the nesting count query |
||
69 | */ |
||
70 | |||
71 | private function getNestingCountQuery(int $parent_id, array $config) : string { |
||
81 | |||
82 | /** |
||
83 | * Select entries from DB |
||
84 | * |
||
85 | * @return array|false : the array of entities or false on failure |
||
86 | */ |
||
87 | |||
88 | private function select(int $parent_id = null, array $config = [], array $order_by = [], int $index = 0, int $display = 0) { |
||
126 | |||
127 | /** |
||
128 | * Count entries in DB |
||
129 | * |
||
130 | * @return int|false : the number of entities or false on failure |
||
131 | */ |
||
132 | |||
133 | private function count(int $parent_id = null, array $config = []) { |
||
149 | |||
150 | /** |
||
151 | * Get the list of items |
||
152 | * |
||
153 | * @param $config an array of filtering options |
||
154 | * @param $order_by an array where each key is a field name and each value is a sorting direction (ASC or DESC) |
||
155 | * @param $index a page index |
||
156 | * @param $display a number of results per page |
||
157 | * |
||
158 | * @return array|false : the array of entities or false on failure |
||
159 | */ |
||
160 | |||
161 | public function getItems(array $config = [], array $order_by = [], int $index = 0, int $display = 0) { |
||
165 | |||
166 | /** |
||
167 | * Get the items count |
||
168 | * |
||
169 | * @param $config : an array of filtering options |
||
170 | * |
||
171 | * @return int|false : the number of entities or false on failure |
||
172 | */ |
||
173 | |||
174 | public function getItemsCount(array $config = []) { |
||
178 | |||
179 | /** |
||
180 | * Get the list of children items |
||
181 | * |
||
182 | * @param $parent_id an id of a parent entity |
||
183 | * @param $config an array of filtering options |
||
184 | * @param $order_by an array where each key is a field name and each value is a sorting direction (ASC or DESC) |
||
185 | * @param $index a page index |
||
186 | * @param $display a number of results per page |
||
187 | * |
||
188 | * @return array|false : the array of entities or false on failure |
||
189 | */ |
||
190 | |||
191 | public function getChildren(int $parent_id = 0, array $config = [], array $order_by = [], int $index = 0, int $display = 0) { |
||
197 | |||
198 | /** |
||
199 | * Get the children items count |
||
200 | * |
||
201 | * @param $parent_id an id of a parent entity |
||
202 | * @param $config an array of filtering options |
||
203 | * |
||
204 | * @return int|false : the number of entities or false on failure |
||
205 | */ |
||
206 | |||
207 | public function getChildrenCount(int $parent_id = 0, array $config = []) { |
||
213 | } |
||
214 | } |
||
215 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.