| 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 | public function __construct(iterable $handlers) |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @inheritDoc |
||
| 23 | */ |
||
| 24 | public function map(): array |
||
| 28 | |||
| 29 | public function add(object $handler): void |
||
| 41 | |||
| 42 | private function stringEndsWith(string $string, string $endWith): bool |
||
| 46 | |||
| 47 | private function getCommandClass(string $commandHandlerClass): string |
||
| 53 | } |
||
| 54 |