[SwiftmailerBundle] replaced MessageLogger class with the one from Swiftmailer 4.1.3
This commit is contained in:
parent
70e0dba77c
commit
9077f6a971
@ -33,6 +33,11 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
|
||||
|
||||
* added a validator for the user password
|
||||
|
||||
### SwiftmailerBundle
|
||||
|
||||
* moved the data collector to the bridge
|
||||
* replaced MessageLogger class with the one from Swiftmailer 4.1.3
|
||||
|
||||
### WebProfilerBundle
|
||||
|
||||
* added a routing panel
|
||||
|
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Bundle\SwiftmailerBundle\Logger;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
/**
|
||||
* MessageLogger.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Clément JOBEILI <clement.jobeili@gmail.com>
|
||||
*/
|
||||
class MessageLogger implements \Swift_Events_SendListener
|
||||
{
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $messages;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->messages = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message list
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getMessages()
|
||||
{
|
||||
return $this->messages;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message count
|
||||
*
|
||||
* @return int count
|
||||
*/
|
||||
public function countMessages()
|
||||
{
|
||||
return count($this->messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty the message list
|
||||
*
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
$this->messages = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked immediately before the Message is sent.
|
||||
*
|
||||
* @param \Swift_Events_SendEvent $evt
|
||||
*/
|
||||
public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
|
||||
{
|
||||
$this->messages[] = clone $evt->getMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked immediately after the Message is sent.
|
||||
*
|
||||
* @param \Swift_Events_SendEvent $evt
|
||||
*/
|
||||
public function sendPerformed(\Swift_Events_SendEvent $evt)
|
||||
{
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
|
||||
<parameter key="swiftmailer.plugin.redirecting.class">Swift_Plugins_RedirectingPlugin</parameter>
|
||||
<parameter key="swiftmailer.plugin.impersonate.class">Swift_Plugins_ImpersonatePlugin</parameter>
|
||||
<parameter key="swiftmailer.plugin.messagelogger.class">Symfony\Bundle\SwiftmailerBundle\Logger\MessageLogger</parameter>
|
||||
<parameter key="swiftmailer.plugin.messagelogger.class">Swift_Plugins_MessageLogger</parameter>
|
||||
<parameter key="swiftmailer.plugin.antiflood.class">Swift_Plugins_AntiFloodPlugin</parameter>
|
||||
<parameter key="swiftmailer.plugin.antiflood.threshold">99</parameter>
|
||||
<parameter key="swiftmailer.plugin.antiflood.sleep">0</parameter>
|
||||
|
@ -30,7 +30,7 @@ $deps = array(
|
||||
array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', 'origin/master'),
|
||||
array('doctrine-common', 'http://github.com/doctrine/common.git', 'origin/master'),
|
||||
array('monolog', 'http://github.com/Seldaek/monolog.git', '1.0.1'),
|
||||
array('swiftmailer', 'http://github.com/swiftmailer/swiftmailer.git', 'v4.1.2'),
|
||||
array('swiftmailer', 'http://github.com/swiftmailer/swiftmailer.git', 'origin/master'),
|
||||
array('twig', 'http://github.com/fabpot/Twig.git', 'origin/master'),
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user