AllInstallationsParams.php
1 year ago
CollectionParams.php
1 year ago
CreateCampaignParams.php
1 year ago
DeliveriesCreateParams.php
1 year ago
FrequentFieldValuesParams.php
1 year ago
PatchCampaignParams.php
1 year ago
PatchInstallationParams.php
1 year ago
TrackEventParams.php
1 year ago
CollectionParams.php
61 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WonderPush\Params; |
| 4 | |
| 5 | if (count(get_included_files()) === 1) { http_response_code(403); exit(); } // Prevent direct access |
| 6 | |
| 7 | use WonderPush\Obj\BaseObject; |
| 8 | |
| 9 | class CollectionParams extends BaseObject { |
| 10 | |
| 11 | /** @var int */ |
| 12 | private $limit; |
| 13 | |
| 14 | /** @var int */ |
| 15 | private $offset; |
| 16 | |
| 17 | /** |
| 18 | * CollectionParams constructor. |
| 19 | * @param int $limit |
| 20 | * @param int $offset |
| 21 | */ |
| 22 | public function __construct($limit = null, $offset = null) { |
| 23 | parent::__construct(); |
| 24 | $this->limit = $limit; |
| 25 | $this->offset = $offset; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * @return int |
| 30 | */ |
| 31 | public function getLimit() { |
| 32 | return $this->limit; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * @param int $limit |
| 37 | * @return CollectionParams |
| 38 | */ |
| 39 | public function setLimit($limit) { |
| 40 | $this->limit = $limit; |
| 41 | return $this; |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * @return int |
| 46 | */ |
| 47 | public function getOffset() { |
| 48 | return $this->offset; |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * @param int $offset |
| 53 | * @return CollectionParams |
| 54 | */ |
| 55 | public function setOffset($offset) { |
| 56 | $this->offset = $offset; |
| 57 | return $this; |
| 58 | } |
| 59 | |
| 60 | } |
| 61 |