1 | <?php |
||
27 | abstract class AbstractPaginateWidgetController extends AbstractWidgetController |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $configuration = [ |
||
34 | 'insertAbove' => true, |
||
35 | 'insertBelow' => true, |
||
36 | 'maximumNumberOfLinks' => 10, |
||
37 | 'addQueryStringMethod' => '', |
||
38 | 'templatePath' => '' |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * @var int |
||
43 | */ |
||
44 | protected $currentPage = 1; |
||
45 | |||
46 | /** |
||
47 | * @var int |
||
48 | */ |
||
49 | protected $displayRangeStart; |
||
50 | |||
51 | /** |
||
52 | * @var int |
||
53 | */ |
||
54 | protected $displayRangeEnd; |
||
55 | |||
56 | /** |
||
57 | * @var int |
||
58 | */ |
||
59 | protected $maximumNumberOfLinks = 99; |
||
60 | |||
61 | /** |
||
62 | * @var int |
||
63 | */ |
||
64 | protected $numberOfPages = 1; |
||
65 | |||
66 | /** |
||
67 | * @var string |
||
68 | */ |
||
69 | protected $templatePath = ''; |
||
70 | |||
71 | /** |
||
72 | * @return void |
||
73 | */ |
||
74 | public function initializeAction() { |
||
81 | |||
82 | /** |
||
83 | * If a certain number of links should be displayed, adjust before and after |
||
84 | * amounts accordingly. |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | protected function calculateDisplayRange() |
||
106 | |||
107 | /** |
||
108 | * Returns an array with the keys "pages", "current", "numberOfPages", "nextPage" & "previousPage" |
||
109 | * |
||
110 | * @return array |
||
111 | */ |
||
112 | protected function buildPagination() |
||
128 | |||
129 | /** |
||
130 | * @return int |
||
131 | */ |
||
132 | abstract protected function getItemsPerPage(); |
||
133 | } |
||
134 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.