1 | <?php |
||
20 | class Wysiwyg |
||
21 | { |
||
22 | /** |
||
23 | * Constructor. |
||
24 | * |
||
25 | * @param array $toolbars Array which contains toolbar |
||
26 | */ |
||
27 | public function __construct($toolbars) |
||
32 | |||
33 | /** |
||
34 | * Callback method that manages the Wysiwyg toolbars. |
||
35 | * |
||
36 | * @param array $toolbars Array which contains the toolbars |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | public function toolbars(array $toolbars) |
||
44 | } |
||
45 |
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: