1 | <?php declare(strict_types=1); |
||
7 | final class SimpleCommandHandlerMap implements CommandHandlerMap |
||
8 | { |
||
9 | private $map = []; |
||
10 | |||
11 | /** |
||
12 | * @param iterable<string, callable> $handlers |
||
13 | */ |
||
14 | 4 | public function __construct(iterable $handlers) |
|
20 | |||
21 | /** |
||
22 | * @inheritDoc |
||
23 | */ |
||
24 | 4 | public function map(): array |
|
28 | |||
29 | 3 | public function add(object $handler): void |
|
41 | |||
42 | 3 | private function stringEndsWith(string $string, string $endWith): bool |
|
46 | |||
47 | 3 | private function getCommandClass(string $commandHandlerClass): string |
|
53 | } |
||
54 |