1 | <?php |
||
22 | class IlluminatePaginatorAdapter implements PaginatorInterface |
||
23 | { |
||
24 | /** |
||
25 | * The paginator instance. |
||
26 | * |
||
27 | * @var \Illuminate\Contracts\Pagination\LengthAwarePaginator |
||
28 | */ |
||
29 | protected $paginator; |
||
30 | |||
31 | /** |
||
32 | * Create a new illuminate pagination adapter. |
||
33 | * |
||
34 | * @param \Illuminate\Contracts\Pagination\LengthAwarePaginator $paginator |
||
35 | * |
||
36 | * @return void |
||
|
|||
37 | */ |
||
38 | 1 | public function __construct(LengthAwarePaginator $paginator) |
|
42 | |||
43 | /** |
||
44 | * Get the current page. |
||
45 | * |
||
46 | * @return int |
||
47 | */ |
||
48 | 1 | public function getCurrentPage() |
|
52 | |||
53 | /** |
||
54 | * Get the last page. |
||
55 | * |
||
56 | * @return int |
||
57 | */ |
||
58 | 1 | public function getLastPage() |
|
62 | |||
63 | /** |
||
64 | * Get the total. |
||
65 | * |
||
66 | * @return int |
||
67 | */ |
||
68 | 1 | public function getTotal() |
|
72 | |||
73 | /** |
||
74 | * Get the count. |
||
75 | * |
||
76 | * @return int |
||
77 | */ |
||
78 | 1 | public function getCount() |
|
86 | |||
87 | /** |
||
88 | * Get the number per page. |
||
89 | * |
||
90 | * @return int |
||
91 | */ |
||
92 | 1 | public function getPerPage() |
|
96 | |||
97 | /** |
||
98 | * Get the url for the given page. |
||
99 | * |
||
100 | * @param int $page |
||
101 | * |
||
102 | * @return string |
||
103 | */ |
||
104 | 1 | public function getUrl($page) |
|
108 | |||
109 | /** |
||
110 | * Get the paginator instance. |
||
111 | * |
||
112 | * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator |
||
113 | */ |
||
114 | 1 | public function getPaginator() |
|
118 | } |
||
119 |
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.