| 1 | <?php declare(strict_types=1); |
||
| 8 | final class SimpleCommandHandlerMap implements CommandHandlerMap |
||
| 9 | { |
||
| 10 | private $map = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param iterable<string, callable> $handlers |
||
| 14 | */ |
||
| 15 | 5 | public function __construct(iterable $handlers) |
|
| 21 | |||
| 22 | /** |
||
| 23 | * @inheritDoc |
||
| 24 | */ |
||
| 25 | 4 | public function map(): array |
|
| 29 | |||
| 30 | 4 | public function add(object $handler): void |
|
| 42 | |||
| 43 | 4 | private function stringEndsWith(string $string, string $endWith): bool |
|
| 49 | |||
| 50 | 3 | private function getCommandClass(string $commandHandlerClass): string |
|
| 56 | } |
||
| 57 |