1 | <?php |
||
20 | class Config implements ConfigurationInterface { |
||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $path; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $values; |
||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | protected $defaults = |
||
35 | [ "analysis" => |
||
36 | [ "ignore" => [] |
||
37 | ] |
||
38 | , "rules" => |
||
39 | [ "schemas" => |
||
40 | [ \Lechimp\Dicto\Rules\DependOn::class |
||
41 | , \Lechimp\Dicto\Rules\Invoke::class |
||
42 | , \Lechimp\Dicto\Rules\ContainText::class |
||
43 | ] |
||
44 | , "properties" => |
||
45 | [ \Lechimp\Dicto\Variables\Name::class |
||
46 | , \Lechimp\Dicto\Variables\In::class |
||
47 | ] |
||
48 | , "variables" => |
||
49 | [ \Lechimp\Dicto\Variables\Classes::class |
||
50 | , \Lechimp\Dicto\Variables\Functions::class |
||
51 | , \Lechimp\Dicto\Variables\Globals::class |
||
52 | , \Lechimp\Dicto\Variables\Files::class |
||
53 | , \Lechimp\Dicto\Variables\Methods::class |
||
54 | , \Lechimp\Dicto\Variables\ErrorSuppressor::class |
||
55 | , \Lechimp\Dicto\Variables\Exit_::class |
||
56 | , \Lechimp\Dicto\Variables\Die_::class |
||
57 | ] |
||
58 | ] |
||
59 | , "runtime" => |
||
60 | [ "check_assertions" => false |
||
61 | ] |
||
62 | ]; |
||
63 | |||
64 | /** |
||
65 | * Build the configuration from nested arrays using a processor. |
||
66 | * |
||
67 | * @param string $path |
||
68 | */ |
||
69 | 14 | public function __construct($path, array $values) { |
|
79 | |||
80 | /** |
||
81 | * Definition of configuration for symfony. |
||
82 | * |
||
83 | * @inheritdocs |
||
84 | */ |
||
85 | 14 | public function getConfigTreeBuilder() { |
|
145 | |||
146 | /** |
||
147 | * @return string |
||
148 | */ |
||
149 | 4 | public function path() { |
|
152 | |||
153 | 9 | protected function maybe_prepend_path($path) { |
|
160 | |||
161 | /** |
||
162 | * @return string |
||
163 | */ |
||
164 | 4 | public function project_rules() { |
|
167 | |||
168 | /** |
||
169 | * @return string |
||
170 | */ |
||
171 | 8 | public function project_root() { |
|
174 | |||
175 | /** |
||
176 | * @return string |
||
177 | */ |
||
178 | 7 | public function project_storage() { |
|
181 | |||
182 | /** |
||
183 | * @return string[] |
||
184 | */ |
||
185 | 6 | public function analysis_ignore() { |
|
188 | |||
189 | /** |
||
190 | * @return string[] |
||
191 | */ |
||
192 | 3 | public function rules_schemas() { |
|
195 | |||
196 | /** |
||
197 | * @return string[] |
||
198 | */ |
||
199 | 3 | public function rules_properties() { |
|
202 | |||
203 | /** |
||
204 | * @return string[] |
||
205 | */ |
||
206 | 3 | public function rules_variables() { |
|
209 | |||
210 | /** |
||
211 | * @return bool |
||
212 | */ |
||
213 | 2 | public function runtime_check_assertions() { |
|
216 | } |
||
217 |