1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 05:18:32 +01:00

renaming of swift collectors

This commit is contained in:
maximebf 2013-08-13 12:00:55 +10:00
parent dafb57073e
commit a1e2a90683
3 changed files with 11 additions and 11 deletions

View File

@ -5,13 +5,13 @@ include __DIR__ . '/../../bootstrap.php';
$debugbarRenderer->setBaseUrl('../../../src/DebugBar/Resources');
use DebugBar\Bridge\SwiftMailer\LogCollector;
use DebugBar\Bridge\SwiftMailer\MessagesCollector;
use DebugBar\Bridge\SwiftMailer\SwiftLogCollector;
use DebugBar\Bridge\SwiftMailer\SwiftMailCollector;
$mailer = Swift_Mailer::newInstance(Swift_NullTransport::newInstance());
$debugbar['messages']->aggregate(new LogCollector($mailer));
$debugbar->addCollector(new MessagesCollector($mailer));
$debugbar['messages']->aggregate(new SwiftLogCollector($mailer));
$debugbar->addCollector(new SwiftMailCollector($mailer));
$message = Swift_Message::newInstance('Wonderful Subject')
->setFrom(array('john@doe.com' => 'John Doe'))

View File

@ -20,7 +20,7 @@ use Swift_Plugins_LoggerPlugin;
*
* http://swiftmailer.org/
*/
class LogCollector extends MessagesCollector implements Swift_Plugins_Logger
class SwiftLogCollector extends MessagesCollector implements Swift_Plugins_Logger
{
public function __construct(Swift_Mailer $mailer)
{

View File

@ -20,7 +20,7 @@ use Swift_Plugins_MessageLogger;
*
* http://swiftmailer.org/
*/
class MessagesCollector extends DataCollector implements Renderable
class SwiftMailCollector extends DataCollector implements Renderable
{
protected $messagesLogger;
@ -63,7 +63,7 @@ class MessagesCollector extends DataCollector implements Renderable
*/
public function getName()
{
return 'swiftmailer_messages';
return 'swiftmailer_mails';
}
/**
@ -72,14 +72,14 @@ class MessagesCollector extends DataCollector implements Renderable
public function getWidgets()
{
return array(
'swiftmailer_messages' => array(
'emails' => array(
'widget' => 'PhpDebugBar.Widgets.MailsWidget',
'map' => 'swiftmailer_messages.mails',
'map' => 'swiftmailer_mails.mails',
'default' => '[]',
'title' => 'Mails'
),
'swiftmailer_messages:badge' => array(
'map' => 'swiftmailer_messages.count',
'emails:badge' => array(
'map' => 'swiftmailer_mails.count',
'default' => 0
)
);