| @@ 159-169 (lines=11) @@ | ||
| 156 | /** |
|
| 157 | * {@inheritdoc} |
|
| 158 | */ |
|
| 159 | public function setCount($count) |
|
| 160 | { |
|
| 161 | $this->count = abs(intval($count)); |
|
| 162 | if ($this->count > 0) { |
|
| 163 | $this->countPages = ceil($this->count / $this->limit); |
|
| 164 | } else { |
|
| 165 | $this->countPages = 1; |
|
| 166 | } |
|
| 167 | ||
| 168 | return $this; |
|
| 169 | } |
|
| 170 | ||
| 171 | /** |
|
| 172 | * {@inheritdoc} |
|
| @@ 185-195 (lines=11) @@ | ||
| 182 | * @param int $limit |
|
| 183 | * @return $this |
|
| 184 | */ |
|
| 185 | public function setLimit($limit) |
|
| 186 | { |
|
| 187 | $this->limit = abs(intval($limit)); |
|
| 188 | if ($this->count > 0) { |
|
| 189 | $this->countPages = ceil($this->count / $this->limit); |
|
| 190 | } else { |
|
| 191 | $this->countPages = 1; |
|
| 192 | } |
|
| 193 | ||
| 194 | return $this; |
|
| 195 | } |
|
| 196 | ||
| 197 | /** |
|
| 198 | * Get pagination limit (items per page). |
|
| @@ 109-119 (lines=11) @@ | ||
| 106 | /** |
|
| 107 | * {@inheritdoc} |
|
| 108 | */ |
|
| 109 | public function setCount($count) |
|
| 110 | { |
|
| 111 | $this->count = abs(intval($count)); |
|
| 112 | if ($this->count > 0) { |
|
| 113 | $this->countPages = ceil($this->count / $this->limit); |
|
| 114 | } else { |
|
| 115 | $this->countPages = 1; |
|
| 116 | } |
|
| 117 | ||
| 118 | return $this; |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @return int |
|