1 | <?php |
||
9 | trait Limit |
||
10 | { |
||
11 | /** |
||
12 | * @var \Sirius\Sql\Component\Limit |
||
13 | */ |
||
14 | protected $limit; |
||
15 | |||
16 | 2 | public function limit(int $limit) |
|
22 | |||
23 | 2 | public function offset(int $offset) |
|
29 | |||
30 | 2 | public function page(int $page) |
|
36 | |||
37 | 2 | public function perPage(int $perPage) |
|
43 | |||
44 | 19 | public function resetLimit() |
|
54 | } |
||
55 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: