1 | <?php |
||
8 | class MainConfig |
||
9 | { |
||
10 | /** @var HandlerConfig[] */ |
||
11 | protected $handlers = []; |
||
12 | |||
13 | /** @var FormatterConfig[] */ |
||
14 | protected $formatters = []; |
||
15 | |||
16 | /** @var ChannelConfig[] */ |
||
17 | protected $channels = []; |
||
18 | |||
19 | /** @var ProcessorConfig[] */ |
||
20 | protected $processors = []; |
||
21 | |||
22 | 10 | public function __construct(array $config) |
|
30 | |||
31 | /** |
||
32 | * @return HandlerConfig[] |
||
33 | */ |
||
34 | 1 | public function getHandlers() |
|
38 | |||
39 | public function hasHandlerConfig($handler) : bool |
||
43 | |||
44 | /** |
||
45 | * @param $handler |
||
46 | * @return null|HandlerConfig |
||
47 | */ |
||
48 | public function getHandlerConfig($handler) |
||
52 | |||
53 | /** |
||
54 | * @return FormatterConfig[] |
||
55 | */ |
||
56 | 2 | public function getFormatters() : array |
|
60 | |||
61 | public function hasFormatterConfig($formatter) : bool |
||
65 | |||
66 | /** |
||
67 | * @param $formatter |
||
68 | * @return null|FormatterConfig |
||
69 | */ |
||
70 | public function getFormatterConfig($formatter) |
||
74 | |||
75 | /** |
||
76 | * @return FormatterConfig[] |
||
77 | */ |
||
78 | 2 | public function getProcessors() : array |
|
82 | |||
83 | public function hasProcessorConfig($processor) : bool |
||
87 | |||
88 | /** |
||
89 | * @param $processor |
||
90 | * @return null|ProcessorConfig |
||
91 | */ |
||
92 | public function getProcessorConfig($processor) |
||
96 | |||
97 | /** |
||
98 | * @return ChannelConfig[] |
||
99 | */ |
||
100 | 1 | public function getChannels() : array |
|
104 | |||
105 | /** |
||
106 | * @param $channel |
||
107 | * @return bool |
||
108 | */ |
||
109 | public function hasChannelConfig($channel) : bool |
||
113 | |||
114 | public function getChannelConfig($channel) |
||
118 | |||
119 | 10 | protected function validateConfig($config) |
|
141 | |||
142 | 10 | protected function buildHandlers($config) |
|
148 | |||
149 | 10 | protected function buildChannels($config) |
|
155 | |||
156 | 10 | protected function buildFormatters($config) |
|
166 | |||
167 | 10 | protected function buildProcessors($config) |
|
177 | } |
||
178 |