/** * Method handling ExampleCommand commands. * * The fact that this method handles the ExampleCommand is signalled by the * convention of the method name: `handle<CommandClassName>`. */ public function handleExampleCommand(ExampleCommand $command) { echo $command->getMessage() . "\n"; }
public function handle(ExampleCommand $command) { var_dump($command->foo()); }