1 | <?php |
||
12 | class DIFactoryConfig extends DI implements ConfigureInterface |
||
13 | { |
||
14 | use Configure2Trait { |
||
15 | configure as protected configure2; |
||
16 | } |
||
17 | |||
18 | |||
19 | |||
20 | /** |
||
21 | 6 | * Constructor optionally creating a set of services from a configuration |
|
22 | * file. |
||
23 | 6 | * |
|
24 | 6 | * @todo Remove $configFile as argument and force using method configure() |
|
25 | 6 | * |
|
26 | 6 | * @param array|string|null $what is an array with key/value |
|
27 | 6 | * config options or a file to |
|
28 | * be included which returns such |
||
29 | * an array. |
||
30 | */ |
||
31 | 6 | public function __construct($what = null) |
|
37 | |||
38 | |||
39 | |||
40 | /** |
||
41 | * Set a configuration object to use, this object have the ability to |
||
42 | * load configuration from an array or files. |
||
43 | * |
||
44 | * @param array|string $what is an array with key/value config options |
||
45 | * or a file to be included which returns such |
||
46 | * an array. |
||
47 | * |
||
48 | * @return self |
||
49 | */ |
||
50 | public function configure($what) |
||
72 | |||
73 | |||
74 | |||
75 | /** |
||
76 | * Create a service from a name and an array containing details on how to |
||
77 | * create it. |
||
78 | * |
||
79 | * @param string $name of service. |
||
80 | * @param array $service details to use when creating the service. |
||
81 | * |
||
82 | * @return self |
||
83 | */ |
||
84 | protected function createService($name, $service) |
||
98 | } |
||
99 |