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:
parent
dafb57073e
commit
a1e2a90683
@ -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'))
|
||||
|
@ -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)
|
||||
{
|
@ -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
|
||||
)
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user