1 | <?php |
||
14 | trait DirectivesAwareConfigTrait |
||
15 | { |
||
16 | protected $directives = []; |
||
17 | protected $_isDirectivesBuilt; |
||
18 | |||
19 | public function buildDirectives() |
||
30 | |||
31 | public function addDirectives($directiveList) |
||
44 | |||
45 | public function addDirective($directive, $directiveInfo = null) |
||
54 | |||
55 | /** |
||
56 | * @param $name |
||
57 | * |
||
58 | * @return InputField |
||
59 | */ |
||
60 | public function getDirective($name) |
||
64 | |||
65 | /** |
||
66 | * @param $name |
||
67 | * |
||
68 | * @return bool |
||
69 | */ |
||
70 | public function hasDirective($name) |
||
74 | |||
75 | public function hasDirectives() |
||
79 | |||
80 | /** |
||
81 | * @return InputField[] |
||
82 | */ |
||
83 | public function getDirectives() |
||
87 | |||
88 | public function removeDirective($name) |
||
96 | |||
97 | } |
||
98 |
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: