Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
use App\Message\SendForgotPassword;
use App\Message\SendImportantEmail;
$router = new SimpleRouter();
$router->add('SendForgotPasswordEmail', function(SendForgotPassword $message) {
// $mailer = ....
// $mailer->sendMail($message->getUser()->getEmail(), 'subject', 'contents');
});
$router->add('SendImportantEmail', function(SendImportantEmail $message) {
// Send important here
});
// Create a Consumer and start the loop.
$consumer = new Consumer($router, $eventDispatcher);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.