Last active
May 13, 2022 06:40
-
-
Save dgafka/9c78a0af850a15b3e97bddaabcacdb27 to your computer and use it in GitHub Desktop.
asynchronous-messaging-04.php
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 | |
$bus->dispatch(new PlaceOrder(), [new ExecutorStamp($executorId)]); | |
(..) | |
class AuthorizeExecutorMiddleware implements MiddlewareInterface | |
{ | |
public function handle(Envelope $envelope, StackInterface $stack): Envelope | |
{ | |
$stamps = $envelope->all(ExecutorStamp::class); | |
// do something more | |
return $stack->next()->handle($envelope, $stack); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment