1 | <?php |
||
15 | abstract class CommandHandler implements CommandHandlerInterface |
||
16 | { |
||
17 | /** |
||
18 | * Verifies the Command class matches the Handler class |
||
19 | * by simply removing "Handler" from the Command class and then comparing. |
||
20 | * IF the Command Handler has been changed via CommandHandlerManager::addCommandHandler, |
||
21 | * or via the filter in CommandHandlerManager::getCommandHandler(), |
||
22 | * then this method MUST be overridden in the new Command Handler class. |
||
23 | * PLZ NOTE: that it also needs to return itself ($this) |
||
24 | * because the CommandBus utilizes method chaining. |
||
25 | * |
||
26 | * @param CommandInterface $command |
||
27 | * @return CommandHandler |
||
28 | * @throws InvalidEntityException |
||
29 | * @since 4.9.80.p |
||
30 | */ |
||
31 | public function verify(CommandInterface $command) |
||
39 | } |
||
40 |