1 | <?php |
||
9 | class MainConfig |
||
10 | { |
||
11 | /** @var HandlerConfig[] */ |
||
12 | protected $handlers = []; |
||
13 | |||
14 | /** @var FormatterConfig[] */ |
||
15 | protected $formatters = []; |
||
16 | |||
17 | /** @var ChannelConfig[] */ |
||
18 | protected $channels = []; |
||
19 | |||
20 | /** @var ProcessorConfig[] */ |
||
21 | protected $processors = []; |
||
22 | |||
23 | 17 | public function __construct(array $config) |
|
31 | |||
32 | /** |
||
33 | * @return HandlerConfig[] |
||
34 | */ |
||
35 | 1 | public function getHandlers() |
|
39 | |||
40 | 1 | public function hasHandlerConfig($handler): bool |
|
44 | |||
45 | /** |
||
46 | * @param $handler |
||
47 | * @return null|HandlerConfig |
||
48 | */ |
||
49 | 2 | public function getHandlerConfig($handler) |
|
53 | |||
54 | /** |
||
55 | * @return FormatterConfig[] |
||
56 | */ |
||
57 | 2 | public function getFormatters(): array |
|
61 | |||
62 | 1 | public function hasFormatterConfig($formatter): bool |
|
66 | |||
67 | /** |
||
68 | * @param $formatter |
||
69 | * @return null|FormatterConfig |
||
70 | */ |
||
71 | 1 | public function getFormatterConfig($formatter) |
|
75 | |||
76 | /** |
||
77 | * @return FormatterConfig[] |
||
78 | */ |
||
79 | 2 | public function getProcessors(): array |
|
83 | |||
84 | 1 | public function hasProcessorConfig($processor): bool |
|
88 | |||
89 | /** |
||
90 | * @param $processor |
||
91 | * @return null|ProcessorConfig |
||
92 | */ |
||
93 | 1 | public function getProcessorConfig($processor) |
|
97 | |||
98 | /** |
||
99 | * @return ChannelConfig[] |
||
100 | */ |
||
101 | 1 | public function getChannels(): array |
|
105 | |||
106 | /** |
||
107 | * @param $channel |
||
108 | * @return bool |
||
109 | */ |
||
110 | 1 | public function hasChannelConfig($channel): bool |
|
114 | |||
115 | 2 | public function getChannelConfig($channel) |
|
119 | |||
120 | 17 | protected function setDefaults(array &$config) |
|
135 | |||
136 | 17 | protected function buildHandlers($config) |
|
142 | |||
143 | 17 | protected function buildChannels($config) |
|
149 | |||
150 | 17 | protected function buildFormatters($config) |
|
160 | |||
161 | 17 | protected function buildProcessors($config) |
|
171 | } |
||
172 |