| 1 | <?php |
||
| 4 | trait CommonComposite |
||
| 5 | { |
||
| 6 | /** |
||
| 7 | * setObservables |
||
| 8 | * |
||
| 9 | * @param array $names The names of the knockout observables. |
||
| 10 | * @return $this |
||
| 11 | */ |
||
| 12 | public function setObservables($names) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * getObservables |
||
| 22 | * |
||
| 23 | * @return array The observables used by the children |
||
| 24 | */ |
||
| 25 | public function getObservables() |
||
| 29 | } |
||
| 30 | |||
| 31 |
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: