Skip to content

Instantly share code, notes, and snippets.

@vatson
Created August 28, 2011 21:28
Show Gist options
  • Save vatson/1177247 to your computer and use it in GitHub Desktop.
Save vatson/1177247 to your computer and use it in GitHub Desktop.
routers....
<?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