| 1 | <?php |
||
| 8 | class Pagination |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var int |
||
| 12 | **/ |
||
| 13 | private $offset = 0; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var int |
||
| 17 | **/ |
||
| 18 | private $limit = 100; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Pagination constructor. |
||
| 22 | * |
||
| 23 | * @param int $limit |
||
| 24 | * @param int $offset |
||
| 25 | */ |
||
| 26 | public function __construct($limit = null, $offset = null) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get offset. |
||
| 39 | * |
||
| 40 | * @return int |
||
| 41 | */ |
||
| 42 | public function getOffset() |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Set offset. |
||
| 49 | * |
||
| 50 | * @param int $offset |
||
| 51 | */ |
||
| 52 | public function setOffset($offset) |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get limit. |
||
| 59 | * |
||
| 60 | * @return int |
||
| 61 | */ |
||
| 62 | public function getLimit() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Set limit. |
||
| 69 | * |
||
| 70 | * @param int $limit |
||
| 71 | */ |
||
| 72 | public function setLimit($limit) |
||
| 76 | } |
||
| 77 |