Created
August 25, 2011 21:16
-
-
Save vatson/1171992 to your computer and use it in GitHub Desktop.
chain prototype
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 | |
$exceptionFilter = new ExceptionFilterHandler(); | |
$exceptionFilter->allow('MyBundle\AbstractException') | |
->ignore('MyBundle\ConcreteException'); | |
$errorFilter = new ErrorFilterHandler(); | |
$errorFilter->allow(UniversalErrorCatcher_ErrorCode::E_CORE_ERROR) | |
->ignore(UniversalErrorCatcher_ErrorCode::E_ERROR); | |
$senderAdapter = new SwiftAdapter(); | |
$senderClient = new Swift(); | |
// OR | |
$senderAdapter = new JMSAdapter(); | |
$senderClient = new Stomp(); | |
$encoder = new HtmlEncoder(); | |
$sender = new SenderHandler($senderAdapter, $senderClient, $encoder); | |
$exceptionFilter->nextDestination($errorFilter)->nextDestination($sender); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment