1 | <?php |
||
12 | trait SemanticComponentsTrait { |
||
13 | |||
14 | public abstract function addComponent(SimpleComponent $component, $attachTo, $params); |
||
15 | /** |
||
16 | * |
||
17 | * @param string $attachTo |
||
18 | * @param string|array $params |
||
19 | * @return GenericComponent |
||
20 | */ |
||
21 | public function generic($attachTo=NULL, $params=NULL) { |
||
24 | /** |
||
25 | * |
||
26 | * @param string $attachTo |
||
27 | * @param string|array $params |
||
28 | * @return Popup |
||
29 | */ |
||
30 | public function popup($attachTo=NULL, $params=NULL) { |
||
33 | |||
34 | /** |
||
35 | * @param string $attachTo |
||
36 | * @param string|array $params |
||
37 | * @return Dropdown |
||
38 | */ |
||
39 | public function dropdown($attachTo=NULL, $params=NULL) { |
||
42 | |||
43 | /** |
||
44 | * @param string $attachTo |
||
45 | * @param string|array $params |
||
46 | * @return Accordion |
||
47 | */ |
||
48 | public function accordion($attachTo=NULL, $params=NULL) { |
||
51 | |||
52 | public function sticky($attachTo=NULL, $params=NULL) { |
||
55 | |||
56 | public function checkbox($attachTo=NULL, $params=NULL) { |
||
59 | |||
60 | public function rating($attachTo=NULL, $params=NULL) { |
||
63 | |||
64 | } |
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: