|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Lit\Bolt; |
|
6
|
|
|
|
|
7
|
|
|
use Lit\Air\Injection\SetterInjector; |
|
8
|
|
|
use Lit\Air\Psr\Container; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Configuration class for Bolt |
|
12
|
|
|
*/ |
|
13
|
|
|
class BoltContainerConfiguration |
|
14
|
|
|
{ |
|
15
|
|
|
/** |
|
16
|
|
|
* Configuration for Bolt. |
|
17
|
|
|
* |
|
18
|
|
|
* @return array |
|
19
|
|
|
*/ |
|
20
|
5 |
|
public static function default() |
|
21
|
|
|
{ |
|
22
|
5 |
|
return SetterInjector::configuration(); |
|
23
|
|
|
} |
|
24
|
|
|
|
|
25
|
|
|
/** |
|
26
|
|
|
* Create a container instance. |
|
27
|
|
|
* |
|
28
|
|
|
* @param array $config The configuration array. |
|
29
|
|
|
* @return Container |
|
30
|
|
|
*/ |
|
31
|
5 |
|
public static function createContainer(array $config = []): Container |
|
32
|
|
|
{ |
|
33
|
5 |
|
return new Container($config + static::default()); |
|
34
|
|
|
} |
|
35
|
|
|
} |
|
36
|
|
|
|