1 | <?php namespace EvolutionCMS\Support; |
||
35 | class Paginate implements PaginginateInterface |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * Number of result to show per page (decided by user) |
||
40 | * |
||
41 | * @var int |
||
42 | */ |
||
43 | public $int_num_result; |
||
44 | |||
45 | /** |
||
46 | * Total number of items (SQL count from db) |
||
47 | * |
||
48 | * @var int |
||
49 | */ |
||
50 | public $int_nbr_row; |
||
51 | |||
52 | /** |
||
53 | * Current position in recordset |
||
54 | * |
||
55 | * @var int |
||
56 | */ |
||
57 | public $int_cur_position; |
||
58 | |||
59 | /** |
||
60 | * Extra argv of query string |
||
61 | * |
||
62 | * @var string |
||
63 | */ |
||
64 | public $str_ext_argv; |
||
65 | |||
66 | /** |
||
67 | * Paging constructor. |
||
68 | * @param int $int_nbr_row |
||
69 | * @param int $int_cur_position |
||
70 | * @param int $int_num_result |
||
71 | * @param string $str_ext_argv |
||
72 | */ |
||
73 | public function __construct($int_nbr_row, $int_cur_position, $int_num_result, $str_ext_argv = "") |
||
80 | |||
81 | /** |
||
82 | * This function print the paging to the screen. |
||
83 | * This function returns an array: |
||
84 | * $array_paging['lower'] lower limit of where we are in result set |
||
85 | * $array_paging['upper'] upper limit of where we are in result set |
||
86 | * $array_paging['total'] total number of result |
||
87 | * $array_paging['previous_link'] href tag for previous link |
||
88 | * $array_paging['next_link'] href tag for next link |
||
89 | * |
||
90 | * @return array |
||
91 | */ |
||
92 | public function getPagingArray() |
||
119 | |||
120 | /** |
||
121 | * This function returns an array of string (href link with the page number) |
||
122 | * |
||
123 | * @return array |
||
124 | */ |
||
125 | public function getPagingRowArray() |
||
141 | |||
142 | /** |
||
143 | * This function returns the total number of page to display. |
||
144 | * |
||
145 | * @return float|int |
||
146 | */ |
||
147 | public function getNumberOfPage() |
||
151 | |||
152 | /** |
||
153 | * This function returns the current page number. |
||
154 | * |
||
155 | * @return int |
||
156 | */ |
||
157 | public function getCurrentPage() |
||
163 | } |
||
164 |
This check marks property names that have not been written in camelCase.
In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes
databaseConnectionString
.