Created
January 21, 2024 22:59
-
-
Save mmouih/5eb10d55ef53f2c4ea0b52aac88755e2 to your computer and use it in GitHub Desktop.
watchdob message handler
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 | |
namespace App\MessageHandler; | |
use App\Message\WatchDogMessage; | |
use Symfony\Component\Messenger\Attribute\AsMessageHandler; | |
#[AsMessageHandler] | |
final class WatchDogMessageHandler | |
{ | |
public function __invoke(WatchDogMessage $message) | |
{ | |
$services = $message->getServices(); | |
// logic to handle your services below | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment