1 | <?php |
||
10 | abstract class AbstractCommandHandler implements CommandHandlerInterface |
||
11 | { |
||
12 | /** |
||
13 | * @inheritdoc |
||
14 | */ |
||
15 | public function supports($commandClassName) |
||
19 | |||
20 | /** |
||
21 | * @return string the fully qualified name of the command class that this handler can accept. |
||
22 | */ |
||
23 | abstract public function getSupportedCommandClassName(); |
||
24 | |||
25 | /** |
||
26 | * @param CommandInterface $command |
||
27 | * |
||
28 | * @return mixed |
||
29 | * @throws InvalidArgumentException |
||
30 | */ |
||
31 | public function handle(CommandInterface $command) |
||
45 | |||
46 | /** |
||
47 | * Handle the command assuming that this command can be handled by the current handler. |
||
48 | * |
||
49 | * @param CommandInterface $command |
||
50 | * |
||
51 | * @return mixed |
||
52 | */ |
||
53 | abstract protected function execute(CommandInterface $command); |
||
54 | } |
||
55 |