Last active
October 16, 2017 15:47
-
-
Save ojhaujjwal/196f2ad32da104debac4979d5a2a6253 to your computer and use it in GitHub Desktop.
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 | |
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