1 | <?php |
||
17 | trait BootstrapComponentsTrait { |
||
18 | |||
19 | public abstract function addComponent(SimpleComponent $component, $attachTo, $params); |
||
20 | /** |
||
21 | * |
||
22 | * @param string $attachTo |
||
23 | * @param string|array $params |
||
24 | * @return GenericComponent |
||
25 | */ |
||
26 | public function generic($attachTo=NULL, $params=NULL) { |
||
29 | |||
30 | /** |
||
31 | * |
||
32 | * @param string $attachTo |
||
33 | * @param string|array $params |
||
34 | * @return Modal |
||
35 | */ |
||
36 | public function modal($attachTo=NULL, $params=NULL) { |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * @param string $attachTo |
||
43 | * @param string|array $params |
||
44 | * @return Tooltip |
||
45 | */ |
||
46 | public function tooltip($attachTo=NULL, $params=NULL) { |
||
49 | |||
50 | /** |
||
51 | * |
||
52 | * @param string $attachTo |
||
53 | * @param string|array $params |
||
54 | * @return Popover |
||
55 | */ |
||
56 | public function popover($attachTo=NULL, $params=NULL) { |
||
59 | |||
60 | /** |
||
61 | * |
||
62 | * @param string $attachTo |
||
63 | * @param string|array $params |
||
64 | * @return Dropdown |
||
65 | */ |
||
66 | public function dropdown($attachTo=NULL, $params=NULL) { |
||
69 | |||
70 | /** |
||
71 | * |
||
72 | * @param string $attachTo |
||
73 | * @param string|array $params |
||
74 | * @return Splitbutton |
||
75 | */ |
||
76 | public function splitbutton($attachTo=NULL, $params=NULL) { |
||
79 | |||
80 | /** |
||
81 | * |
||
82 | * @param string $attachTo |
||
83 | * @param string|array $params |
||
84 | * @return Tab |
||
85 | */ |
||
86 | public function tab($attachTo=NULL, $params=NULL) { |
||
89 | |||
90 | /** |
||
91 | * |
||
92 | * @param string $attachTo |
||
93 | * @param string|array $params |
||
94 | * @return Collapse |
||
95 | */ |
||
96 | public function collapse($attachTo=NULL, $params=NULL) { |
||
99 | |||
100 | /** |
||
101 | * |
||
102 | * @param string $attachTo |
||
103 | * @param string|array $params |
||
104 | * @return Carousel |
||
105 | */ |
||
106 | public function carousel($attachTo=NULL, $params=NULL) { |
||
109 | } |
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: