PHP Class AcMailer\Controller\Plugin\SendMailPlugin

Author: Alejandro Celaya Alastrué
Inheritance: extends Zend\Mvc\Controller\Plugin\AbstractPlugin, implements AcMailer\Service\MailServiceAwareInterface
Afficher le fichier Open project: acelaya/zf2-acmailer Class Usage Examples

Protected Properties

Свойство Type Description
$mailService AcMailer\Service\MailServiceInterface

Méthodes publiques

Méthode Description
__construct ( AcMailer\Service\MailServiceInterface $mailService )
__invoke ( null | string | Zend\View\Model\ViewModel | array $bodyOrConfig = null, null | string $subject = null, null | array $to = null, null | string | array $from = null, null | array $cc = null, null | array $bcc = null, null | array $attachments = null, null | array $replyTo = null, $encoding = null ) : AcMailer\Service\MailServiceInterface | AcMailer\Result\ResultInterface If no arguments are provided, the mail service is returned.
getMailService ( ) : AcMailer\Service\MailServiceInterface
setMailService ( AcMailer\Service\MailServiceInterface $mailService )

Méthodes protégées

Méthode Description
applyArgsToMailService ( array $args ) Applies the arguments provided while invoking this plugin to the MailService, discarding any previous configuration
applyArrayArgs ( array $args, string $key )
normalizeMailArgs ( array $args ) : array Normalizes the arguments passed when invoking this plugin so that they can be treated in a consistent way

Method Details

__construct() public méthode

public __construct ( AcMailer\Service\MailServiceInterface $mailService )
$mailService AcMailer\Service\MailServiceInterface

__invoke() public méthode

If any argument is provided, they will be used to configure the MailService and send an email. The result object will be returned in that case
public __invoke ( null | string | Zend\View\Model\ViewModel | array $bodyOrConfig = null, null | string $subject = null, null | array $to = null, null | string | array $from = null, null | array $cc = null, null | array $bcc = null, null | array $attachments = null, null | array $replyTo = null, $encoding = null ) : AcMailer\Service\MailServiceInterface | AcMailer\Result\ResultInterface
$bodyOrConfig null | string | Zend\View\Model\ViewModel | array
$subject null | string
$to null | array
$from null | string | array
$cc null | array
$bcc null | array
$attachments null | array
$replyTo null | array
Résultat AcMailer\Service\MailServiceInterface | AcMailer\Result\ResultInterface

applyArgsToMailService() protected méthode

Applies the arguments provided while invoking this plugin to the MailService, discarding any previous configuration
protected applyArgsToMailService ( array $args )
$args array

applyArrayArgs() protected méthode

protected applyArrayArgs ( array $args, string $key )
$args array
$key string

getMailService() public méthode

public getMailService ( ) : AcMailer\Service\MailServiceInterface
Résultat AcMailer\Service\MailServiceInterface

normalizeMailArgs() protected méthode

Normalizes the arguments passed when invoking this plugin so that they can be treated in a consistent way
protected normalizeMailArgs ( array $args ) : array
$args array
Résultat array

setMailService() public méthode

public setMailService ( AcMailer\Service\MailServiceInterface $mailService )
$mailService AcMailer\Service\MailServiceInterface

Property Details

$mailService protected_oe property

protected MailServiceInterface,AcMailer\Service $mailService
Résultat AcMailer\Service\MailServiceInterface