| Total Complexity | 12 |
| Total Lines | 174 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Parameters |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var integer $limit |
||
| 11 | */ |
||
| 12 | protected $limit = 20; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var integer $offset |
||
| 16 | */ |
||
| 17 | protected $offset = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var mixed $select |
||
| 21 | */ |
||
| 22 | protected $select = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var bool $withMeta |
||
| 26 | */ |
||
| 27 | protected $withMeta = false; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var bool $countTotal |
||
| 31 | */ |
||
| 32 | protected $countTotal = false; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var array $orderBy |
||
| 36 | */ |
||
| 37 | protected $orderBy; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Get $countTotal |
||
| 41 | * |
||
| 42 | * @return bool |
||
| 43 | */ |
||
| 44 | public function isCountTotal(): bool |
||
| 45 | { |
||
| 46 | return $this->countTotal; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Set $countTotal |
||
| 51 | * |
||
| 52 | * @param bool $countTotal |
||
| 53 | * |
||
| 54 | * @return self |
||
| 55 | */ |
||
| 56 | public function countTotal(bool $countTotal) |
||
| 57 | { |
||
| 58 | $this->countTotal = $countTotal; |
||
| 59 | |||
| 60 | return $this; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Get $withMeta |
||
| 65 | * |
||
| 66 | * @return bool |
||
| 67 | */ |
||
| 68 | public function isWithMeta() |
||
| 69 | { |
||
| 70 | return $this->withMeta; |
||
| 71 | } |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Set $withMeta |
||
| 75 | * |
||
| 76 | * @param bool $withMeta |
||
| 77 | * |
||
| 78 | * @return self |
||
| 79 | */ |
||
| 80 | public function withMeta(bool $withMeta) |
||
| 81 | { |
||
| 82 | $this->withMeta = $withMeta; |
||
| 83 | |||
| 84 | return $this; |
||
| 85 | } |
||
| 86 | |||
| 87 | /** |
||
| 88 | * Get $select |
||
| 89 | * |
||
| 90 | * @return mixed |
||
| 91 | */ |
||
| 92 | public function getSelect() |
||
| 93 | { |
||
| 94 | return $this->select; |
||
| 95 | } |
||
| 96 | |||
| 97 | /** |
||
| 98 | * Set $select |
||
| 99 | * |
||
| 100 | * @param mixed $select |
||
| 101 | * |
||
| 102 | * @return self |
||
| 103 | */ |
||
| 104 | public function setSelect($select) |
||
| 105 | { |
||
| 106 | $this->select = $select; |
||
| 107 | |||
| 108 | return $this; |
||
| 109 | } |
||
| 110 | |||
| 111 | /** |
||
| 112 | * Get $offset |
||
| 113 | * |
||
| 114 | * @return integer |
||
| 115 | */ |
||
| 116 | public function getOffset(): int |
||
| 117 | { |
||
| 118 | return $this->offset; |
||
| 119 | } |
||
| 120 | |||
| 121 | /** |
||
| 122 | * Set $offset |
||
| 123 | * |
||
| 124 | * @param integer $offset |
||
| 125 | * |
||
| 126 | * @return self |
||
| 127 | */ |
||
| 128 | public function setOffset(int $offset) |
||
| 129 | { |
||
| 130 | $this->offset = $offset; |
||
| 131 | |||
| 132 | return $this; |
||
| 133 | } |
||
| 134 | |||
| 135 | /** |
||
| 136 | * Get $limit |
||
| 137 | * |
||
| 138 | * @return integer |
||
| 139 | */ |
||
| 140 | public function getLimit(): int |
||
| 141 | { |
||
| 142 | return $this->limit; |
||
| 143 | } |
||
| 144 | |||
| 145 | /** |
||
| 146 | * Set $limit |
||
| 147 | * |
||
| 148 | * @param integer $limit |
||
| 149 | * |
||
| 150 | * @return self |
||
| 151 | */ |
||
| 152 | public function setLimit(int $limit) |
||
| 153 | { |
||
| 154 | $this->limit = $limit; |
||
| 155 | |||
| 156 | return $this; |
||
| 157 | } |
||
| 158 | |||
| 159 | /** |
||
| 160 | * Get $orderBy |
||
| 161 | * |
||
| 162 | * @return array |
||
| 163 | */ |
||
| 164 | public function getOrderBy() |
||
| 165 | { |
||
| 166 | return $this->orderBy; |
||
| 167 | } |
||
| 168 | |||
| 169 | /** |
||
| 170 | * Set $orderBy |
||
| 171 | * |
||
| 172 | * @param array $orderBy $orderBy |
||
| 173 | * |
||
| 174 | * @return self |
||
| 175 | */ |
||
| 176 | public function setOrderBy(array $orderBy) |
||
| 181 | } |
||
| 182 | } |
||
| 183 |