Swift_Transport::registerPlugin PHP Method

registerPlugin() public method

Register a plugin in the Transport.
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener
    public function registerPlugin(Swift_Events_EventListener $plugin);

Usage Example

Esempio n. 1
0
 function __construct(LoggerInterface $logger, \Swift_Transport $transport)
 {
     $this->logger = $logger;
     // We register the plugin here and not using the swiftmailer.plugin tag
     // to avoid the ServiceCircularReferenceException we get when Monolog is
     // configured to mail the messages through SwiftMailer.
     $transport->registerPlugin(new \Swift_Plugins_LoggerPlugin($this));
 }
All Usage Examples Of Swift_Transport::registerPlugin