Last active
April 30, 2020 11:11
-
-
Save codeliner/f2db029bbc66dc0e20431bd51195880f to your computer and use it in GitHub Desktop.
getprooph.org sample snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
class CargoRouteListener extends ProcessManager | |
{ | |
function listenOn(DestiniationWasChanged $event) | |
{ | |
$rerouteCargo = RerouteCargo::to( | |
$event->newDestination(), | |
$event->cargoId() | |
); | |
$this->commandBus->dispatch($rerouteCargo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And because gist comments and mentions don't trigger notifications, @codeliner will never be aware of the typo :)