1 | <?php |
||
14 | trait DirectivesAwareConfigTrait |
||
15 | { |
||
16 | protected $directives = []; |
||
17 | protected $_isDirectivesBuilt; |
||
18 | |||
19 | public function buildDirectives() |
||
28 | |||
29 | public function addDirectives($directiveList) |
||
42 | |||
43 | public function addDirective($directive, $directiveInfo = null) |
||
52 | |||
53 | /** |
||
54 | * @param $name |
||
55 | * |
||
56 | * @return InputField |
||
57 | */ |
||
58 | public function getDirective($name) |
||
62 | |||
63 | /** |
||
64 | * @param $name |
||
65 | * |
||
66 | * @return bool |
||
67 | */ |
||
68 | public function hasDirective($name) |
||
72 | |||
73 | public function hasDirectives() |
||
77 | |||
78 | /** |
||
79 | * @return InputField[] |
||
80 | */ |
||
81 | public function getDirectives() |
||
85 | |||
86 | public function removeDirective($name) |
||
94 | |||
95 | } |
||
96 |
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: