1 | <?php |
||
8 | trait SemanticComponentsTrait { |
||
9 | /** |
||
10 | * |
||
11 | * @param string $attachTo |
||
12 | * @param string|array $params |
||
13 | * @return $this |
||
14 | */ |
||
15 | public function generic($attachTo=NULL, $params=NULL) { |
||
18 | /** |
||
19 | * |
||
20 | * @param string $attachTo |
||
21 | * @param string|array $params |
||
22 | * @return $this |
||
23 | */ |
||
24 | public function popup($attachTo=NULL, $params=NULL) { |
||
27 | |||
28 | public function dropdown($attachTo=NULL, $params=NULL) { |
||
31 | |||
32 | public function accordion($attachTo=NULL, $params=NULL) { |
||
35 | |||
36 | } |
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: