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 | 18 | 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 | 18 | public function getConfigTreeBuilder(array $analyzersConfiguration = []) |
|
98 | |||
99 | /** |
||
100 | * Sets a configuration setting. |
||
101 | * |
||
102 | * @param string $key |
||
103 | * @param mixed $value |
||
104 | */ |
||
105 | 18 | public function setValue($key, $value) |
|
109 | |||
110 | /** |
||
111 | * Gets a configuration setting. |
||
112 | * |
||
113 | * @param string $key |
||
114 | * @param mixed $default |
||
115 | * |
||
116 | * @return mixed |
||
117 | */ |
||
118 | 18 | public function getValue($key, $default = null) |
|
126 | |||
127 | /** |
||
128 | * Checks if a configuration setting is set. |
||
129 | * |
||
130 | * @param string $key |
||
131 | * @return bool |
||
132 | */ |
||
133 | 18 | public function valueIsTrue($key) |
|
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | */ |
||
141 | public function getPath() |
||
145 | } |
||
146 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.