1 | <?php |
||
16 | class Configuration implements ConfigurationInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $configuration; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $path; |
||
27 | |||
28 | /** |
||
29 | * Create a configuration from array. |
||
30 | * |
||
31 | * @param array $configuration |
||
32 | * @param array $analyzersConfiguration |
||
33 | */ |
||
34 | 297 | public function __construct(array $configuration = [], array $analyzersConfiguration = [], $path = "") |
|
47 | |||
48 | /** |
||
49 | * Generates the configuration tree. |
||
50 | * |
||
51 | * @param array $analyzersConfiguration |
||
52 | * |
||
53 | * @return TreeBuilder |
||
54 | */ |
||
55 | 297 | public function getConfigTreeBuilder(array $analyzersConfiguration = []) |
|
105 | |||
106 | /** |
||
107 | * Sets a configuration setting. |
||
108 | * |
||
109 | * @param string $key |
||
110 | * @param mixed $value |
||
111 | */ |
||
112 | 53 | public function setValue($key, $value) |
|
116 | |||
117 | /** |
||
118 | * Gets a configuration setting. |
||
119 | * |
||
120 | * @param string $key |
||
121 | * @param mixed $default |
||
122 | * |
||
123 | * @return mixed |
||
124 | */ |
||
125 | 55 | public function getValue($key, $default = null) |
|
133 | |||
134 | /** |
||
135 | * Checks if a configuration setting is set. |
||
136 | * |
||
137 | * @param string $key |
||
138 | * @return bool |
||
139 | */ |
||
140 | 55 | public function valueIsTrue($key) |
|
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | 2 | public function getPath() |
|
152 | } |
||
153 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.