1 | <?php |
||
14 | class Loader { |
||
15 | |||
16 | private $parent = null, $index = 0, $display = 0, $items = [], $total = 0; |
||
17 | |||
18 | /** |
||
19 | * Constructor |
||
20 | */ |
||
21 | |||
22 | public function __construct(Container $parent) { |
||
26 | |||
27 | /** |
||
28 | * Load items from the filesystem |
||
29 | * |
||
30 | * @param $index a page index |
||
31 | * @param $display a number of results per page |
||
32 | * |
||
33 | * @return Modules\Filemanager\Utils\Loader : the current loader object |
||
34 | */ |
||
35 | |||
36 | public function load(int $index = 0, int $display = 0) : Loader { |
||
74 | |||
75 | /** |
||
76 | * Get the page index |
||
77 | */ |
||
78 | |||
79 | public function getIndex() : int { |
||
83 | |||
84 | /** |
||
85 | * Get the number of results per page |
||
86 | */ |
||
87 | |||
88 | public function getDisplay() : int { |
||
92 | |||
93 | /** |
||
94 | * Get the items list |
||
95 | */ |
||
96 | |||
97 | public function getItems() : array { |
||
101 | |||
102 | /** |
||
103 | * Get the total number of items |
||
104 | */ |
||
105 | |||
106 | public function getTotal() : int { |
||
110 | } |
||
111 | } |
||
112 |