| @@ 230-236 (lines=7) @@ | ||
| 227 | throw new InvalidArgumentException(sprintf('Formatter %s not configured.', $option['formatter'])); |
|
| 228 | } |
|
| 229 | ||
| 230 | if (isset($option['processors'])) { |
|
| 231 | foreach ($option['processors'] as $processorId) { |
|
| 232 | if (!isset($this->processors[$processorId])) { |
|
| 233 | throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
|
| 234 | } |
|
| 235 | } |
|
| 236 | } |
|
| 237 | ||
| 238 | $class = $option['handler'] ?? StreamHandler::class; |
|
| 239 | unset($option['handler']); |
|
| @@ 282-288 (lines=7) @@ | ||
| 279 | protected function formatChannels(array $channels = []) |
|
| 280 | { |
|
| 281 | foreach ($channels as $id => $option) { |
|
| 282 | if (isset($option['processors'])) { |
|
| 283 | foreach ($option['processors'] as $processorId) { |
|
| 284 | if (!isset($this->processors[$processorId])) { |
|
| 285 | throw new InvalidArgumentException(sprintf('Processor %s not configured.', $processorId)); |
|
| 286 | } |
|
| 287 | } |
|
| 288 | } |
|
| 289 | ||
| 290 | if (isset($option['handlers'])) { |
|
| 291 | foreach ($option['handlers'] as $handlerId) { |
|
| @@ 290-296 (lines=7) @@ | ||
| 287 | } |
|
| 288 | } |
|
| 289 | ||
| 290 | if (isset($option['handlers'])) { |
|
| 291 | foreach ($option['handlers'] as $handlerId) { |
|
| 292 | if (!isset($this->handlers[$handlerId])) { |
|
| 293 | throw new InvalidArgumentException(sprintf('Handler %s not configured.', $handlerId)); |
|
| 294 | } |
|
| 295 | } |
|
| 296 | } |
|
| 297 | $channels[$id] = array_merge(['handlers' => [], 'processors' => []], $option); |
|
| 298 | } |
|
| 299 | ||