Last active
October 16, 2017 15:32
-
-
Save ojhaujjwal/dfc87a773b86542b755e444a0c7cc5ce 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 Bernard\Router\SimpleRouter; | |
use Bernard\Consumer; | |
use Symfony\Component\EventDispatcher\EventDispatcher; | |
// .. create driver and a queuefactory | |
$router = new SimpleRouter(); | |
$router->add('SendForgotPasswordEmail', function() { | |
//TODO: here's the logic to sending your email | |
}); | |
$eventDispatcher = new EventDispatcher(); | |
// Create a Consumer and start the loop. | |
$consumer = new Consumer($router, $eventDispatcher); | |
$consumer->consume($queueFactory->create('emails')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment