Last active
May 13, 2022 06:48
-
-
Save dgafka/b6d2f7de1188482b055da6cbbfb55f9c to your computer and use it in GitHub Desktop.
asynchronous-messaging-07.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 | |
class AddExecutorIdInterceptor | |
{ | |
#[Before(pointcut: CommandHandler::class, changeHeaders: true)] | |
public function addExecutorId(PlaceOrder $payload, array $headers): array | |
{ | |
// changeHeaders: true/false allows for changing headers or payload. | |
// you don't need to pass parameters, if you don't want to use them. | |
// returning null means stop execution. | |
return ["executorId" => $id]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment