| 1 | <?php |
||
| 18 | trait LimitTrait |
||
| 19 | { |
||
| 20 | private $limit = 0; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * |
||
| 24 | * Sets a limit count on the query. |
||
| 25 | * |
||
| 26 | * @param int $limit The number of rows to select. |
||
| 27 | * |
||
| 28 | * @return $this |
||
| 29 | * |
||
| 30 | */ |
||
| 31 | 55 | public function limit($limit) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * |
||
| 39 | * Returns the LIMIT value. |
||
| 40 | * |
||
| 41 | * @return int |
||
| 42 | * |
||
| 43 | */ |
||
| 44 | 208 | public function getLimit() |
|
| 48 | |||
| 49 | /** |
||
| 50 | * |
||
| 51 | * Builds the `LIMIT` clause of the statement. |
||
| 52 | * |
||
| 53 | * @return string |
||
| 54 | * |
||
| 55 | */ |
||
| 56 | 9 | protected function buildLimit() |
|
| 63 | } |
||
| 64 |