File tree 2 files changed +29
-2
lines changed
2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 15
15
* wanted target and finally it generates pagination view
16
16
* which is only the result of paginator
17
17
*/
18
- class Paginator
18
+ class Paginator implements PaginatorInterface
19
19
{
20
20
/**
21
21
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
@@ -80,7 +80,7 @@ public function setDefaultPaginatorOptions(array $options)
80
80
* @throws \LogicException
81
81
* @return \Knp\Component\Pager\Pagination\PaginationInterface
82
82
*/
83
- public function paginate ($ target , $ page = 1 , $ limit = 10 , $ options = array ())
83
+ public function paginate ($ target , $ page = 1 , $ limit = 10 , array $ options = array ())
84
84
{
85
85
$ limit = intval (abs ($ limit ));
86
86
if (!$ limit ) {
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Knp \Component \Pager ;
4
+
5
+ /**
6
+ * PaginatorInterface
7
+ */
8
+ interface PaginatorInterface
9
+ {
10
+ /**
11
+ * Paginates anything (depending on event listeners)
12
+ * into Pagination object, which is a view targeted
13
+ * pagination object (might be aggregated helper object)
14
+ * responsible for the pagination result representation
15
+ *
16
+ * @param mixed $target - anything what needs to be paginated
17
+ * @param integer $page - page number, starting from 1
18
+ * @param integer $limit - number of items per page
19
+ * @param array $options - less used options:
20
+ * boolean $distinct - default true for distinction of results
21
+ * string $alias - pagination alias, default none
22
+ * array $whitelist - sortable whitelist for target fields being paginated
23
+ * @throws \LogicException
24
+ * @return \Knp\Component\Pager\Pagination\PaginationInterface
25
+ */
26
+ function paginate ($ target , $ page = 1 , $ limit = 10 , array $ options = array ());
27
+ }
You can’t perform that action at this time.
0 commit comments