Created
August 28, 2011 21:28
-
-
Save vatson/1177247 to your computer and use it in GitHub Desktop.
routers....
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 | |
$filter = new Filter(); | |
$filter->allow('MyBundle\AbstractException') | |
->ignore('MyBundle\ConcreteException'); | |
$adapter = new SwiftAdapter(); | |
$adapter->setClient(new Swift()); | |
$systemProvider = new SystemProvider(); | |
$envProvider = new EnvProvider(); | |
$serializer = new Serializer( | |
array(new DataHolderNormailizer), | |
array('html' => new HtmlEncoder()) | |
); | |
$sender = new SenderHandler($adapter, $serializer); | |
$sender->setFormat('html'); | |
$router = new Router(); | |
$router->default('[email protected]'); | |
$router->associate('[email protected]', 'MyBundle\WaringException'); | |
$router->associate('[email protected]', 'MyBundle\FatalException'); | |
$filter->nextNode($systemProvider) | |
->nextNode($envProvider) | |
->nextNode($router) | |
->nextNode($sender) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment