Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | final class HandlerProviderWithContainer implements HandlerProvider |
||
18 | { |
||
19 | /** |
||
20 | * @param array<class-string, string> $messageToHandler |
||
21 | * Where _key_ is a message class and _value_ the service identifier of its handler. |
||
22 | */ |
||
23 | public function __construct( |
||
24 | private ContainerInterface $container, |
||
25 | private array $messageToHandler |
||
26 | ) { |
||
27 | $this->container = $container; |
||
28 | $this->messageToHandler = $messageToHandler; |
||
29 | } |
||
30 | |||
31 | public function getHandlerForMessage(object $message): ?callable |
||
40 | } |
||
41 | } |
||
42 |