1 | <?php |
||
8 | abstract class Builder implements BuildsQueries |
||
9 | { |
||
10 | /** |
||
11 | * Set the model for this query. |
||
12 | * |
||
13 | * @param Model $model |
||
14 | * |
||
15 | * @return $this |
||
16 | */ |
||
17 | public function setModel(Model $model) |
||
23 | |||
24 | /** |
||
25 | * Get the model |
||
26 | * |
||
27 | * @return Model |
||
28 | */ |
||
29 | public function getModel() |
||
33 | } |
||
34 |
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: