PHP Class Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector

Author: Fabien Potencier ([email protected])
Author: ClĂ©ment JOBEILI ([email protected])
Inheritance: extends Symfony\Component\HttpKernel\DataCollector\DataCollector
Datei anzeigen Open project: symfony/swiftmailer-bundle Class Usage Examples

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\ContainerInterface $container ) We don't inject the message logger and mailer here to avoid the creation of these objects when no emails are sent.
collect ( Request $request, Response $response, Exception $exception = null )
getMailerData ( $name ) : array Returns the data collected of a mailer.
getMailers ( ) : array Returns the mailer names.
getMessageCount ( $name = null ) : integer Returns the message count of a mailer or the total.
getMessages ( $name = 'default' ) : array Returns the messages of a mailer.
getName ( )
isDefaultMailer ( $name ) : boolean Returns if the mailer is the default mailer.
isSpool ( $name ) : boolean Returns if the mailer has spool.

Method Details

__construct() public method

We don't inject the message logger and mailer here to avoid the creation of these objects when no emails are sent.
public __construct ( Symfony\Component\DependencyInjection\ContainerInterface $container )
$container Symfony\Component\DependencyInjection\ContainerInterface

collect() public method

public collect ( Request $request, Response $response, Exception $exception = null )
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
$exception Exception

getMailerData() public method

Returns the data collected of a mailer.
public getMailerData ( $name ) : array
return array The data of the mailer.

getMailers() public method

Returns the mailer names.
public getMailers ( ) : array
return array The mailer names.

getMessageCount() public method

Returns the message count of a mailer or the total.
public getMessageCount ( $name = null ) : integer
return integer The number of messages.

getMessages() public method

Returns the messages of a mailer.
public getMessages ( $name = 'default' ) : array
return array The messages.

getName() public method

public getName ( )

isDefaultMailer() public method

Returns if the mailer is the default mailer.
public isDefaultMailer ( $name ) : boolean
return boolean

isSpool() public method

Returns if the mailer has spool.
public isSpool ( $name ) : boolean
return boolean