1 | <?php |
||
20 | class PhalconFrameworkPaginatorAdapter implements PaginatorInterface |
||
21 | { |
||
22 | /** |
||
23 | * A slice of the result set to show in the pagination |
||
24 | * |
||
25 | * @var \Phalcon\Paginator\AdapterInterface |
||
26 | */ |
||
27 | protected $paginator; |
||
28 | |||
29 | /*** |
||
30 | * |
||
31 | * @return void |
||
|
|||
32 | */ |
||
33 | 1 | public function __construct($paginator) |
|
37 | |||
38 | /** |
||
39 | * Get the current page. |
||
40 | * |
||
41 | * @return int |
||
42 | */ |
||
43 | 1 | public function getCurrentPage() |
|
47 | |||
48 | /** |
||
49 | * Get the last page. |
||
50 | * |
||
51 | * @return int |
||
52 | */ |
||
53 | 1 | public function getLastPage() |
|
57 | |||
58 | /** |
||
59 | * Get the total. |
||
60 | * |
||
61 | * @return int |
||
62 | */ |
||
63 | 1 | public function getTotal() |
|
67 | |||
68 | /** |
||
69 | * Get the count. |
||
70 | * |
||
71 | * @return int |
||
72 | */ |
||
73 | 1 | public function getCount() |
|
77 | |||
78 | /** |
||
79 | * Get the number per page. |
||
80 | * |
||
81 | * @return int |
||
82 | */ |
||
83 | public function getPerPage() |
||
88 | |||
89 | /** |
||
90 | * Get the next. |
||
91 | * |
||
92 | * @return int |
||
93 | */ |
||
94 | public function getNext() |
||
98 | |||
99 | /** |
||
100 | * Get the url for the given page. |
||
101 | * |
||
102 | * @param int $page |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getUrl($page) |
||
110 | |||
111 | /** |
||
112 | * Get the paginate object. |
||
113 | * |
||
114 | * @return object |
||
115 | */ |
||
116 | 1 | public function getPaginate() |
|
121 | } |
||
122 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.