1 | <?php |
||
20 | class InjectableConfig extends Component implements ConfigInterface, \IteratorAggregate |
||
|
|||
21 | { |
||
22 | /** |
||
23 | * Spiral provides ability to automatically inject configs using configurator. |
||
24 | */ |
||
25 | const INJECTOR = ConfiguratorInterface::class; |
||
26 | |||
27 | /** |
||
28 | * Configuration data. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $config = []; |
||
33 | |||
34 | /** |
||
35 | * At this moment on array based configs can be supported. |
||
36 | * |
||
37 | * @param array $config |
||
38 | */ |
||
39 | 25 | public function __construct(array $config = []) |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 2 | public function toArray(): array |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 2 | public function offsetExists($offset) |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 2 | public function offsetGet($offset) |
|
71 | |||
72 | /** |
||
73 | *{@inheritdoc} |
||
74 | * |
||
75 | * @throws ConfigException |
||
76 | */ |
||
77 | 1 | public function offsetSet($offset, $value) |
|
83 | |||
84 | /** |
||
85 | *{@inheritdoc} |
||
86 | * |
||
87 | * @throws ConfigException |
||
88 | */ |
||
89 | 1 | public function offsetUnset($offset) |
|
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | 1 | public function getIterator() |
|
103 | |||
104 | /** |
||
105 | * Restoring state. |
||
106 | * |
||
107 | * @param array $an_array |
||
108 | * |
||
109 | * @return static |
||
110 | */ |
||
111 | 1 | public static function __set_state($an_array) |
|
115 | } |
||
116 |
This class, trait or interface has been deprecated.