1 | <?php |
||
21 | abstract class ProcessorAbstract |
||
22 | { |
||
23 | /** |
||
24 | * make it an invokable |
||
25 | * |
||
26 | * @param LogEntryInterface $entry |
||
27 | */ |
||
28 | public function __invoke(LogEntryInterface $entry) |
||
33 | |||
34 | /** |
||
35 | * update info in the $context |
||
36 | * |
||
37 | * ```php |
||
38 | * protected function updateContext(array $context): array |
||
39 | * { |
||
40 | * $context['bingo'] = 'wow'; |
||
41 | * return $context; |
||
42 | * } |
||
43 | * ``` |
||
44 | * |
||
45 | * @param array $context |
||
46 | * @return array |
||
47 | */ |
||
48 | abstract protected function updateContext(array $context): array; |
||
49 | } |