1 | <?php |
||
11 | final class Configurator |
||
12 | { |
||
13 | /** |
||
14 | * @var ApplicationConfig |
||
15 | */ |
||
16 | private $config; |
||
17 | |||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $settings = [ |
||
22 | 'config_prefix' => 'config', |
||
23 | 'config_separator' => '.', |
||
24 | 'services_key' => 'di.services', |
||
25 | 'inflectors_key' => 'di.inflectors', |
||
26 | 'singleton_services' => false, |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * @api |
||
31 | * |
||
32 | * @return Configurator |
||
33 | */ |
||
34 | public static function apply() |
||
38 | |||
39 | private function __construct() |
||
43 | |||
44 | /** |
||
45 | * @api |
||
46 | * |
||
47 | * @param array $config |
||
48 | * |
||
49 | * @return Configurator |
||
50 | */ |
||
51 | public function configFromArray(array $config) |
||
57 | |||
58 | /** |
||
59 | * @api |
||
60 | * |
||
61 | * @param string $pattern |
||
62 | * |
||
63 | * @return Configurator |
||
64 | */ |
||
65 | public function configFromFiles($pattern) |
||
89 | |||
90 | /** |
||
91 | * @api |
||
92 | * |
||
93 | * @param string $name |
||
94 | * @param mixed $value |
||
95 | * |
||
96 | * @return Configurator |
||
97 | */ |
||
98 | public function withSetting($name, $value) |
||
111 | |||
112 | /** |
||
113 | * @api |
||
114 | * |
||
115 | * @param object $container |
||
116 | * |
||
117 | * @return void |
||
118 | */ |
||
119 | public function to($container) |
||
143 | } |
||
144 |