sfContext::getMailer PHP Méthode

getMailer() public méthode

Retrieves the mailer.
public getMailer ( ) : sfMailer
Résultat sfMailer The current sfMailer implementation instance.
    public function getMailer()
    {
        if (!isset($this->factories['mailer'])) {
            $this->factories['mailer'] = new $this->mailerConfiguration['class']($this->dispatcher, $this->mailerConfiguration);
        }
        return $this->factories['mailer'];
    }

Usage Example

Exemple #1
0
 public function __construct(sfContext $context, sfEventDispatcher $dispatcher)
 {
     $this->mailer = $context->getMailer();
     $this->dispatcher = $dispatcher;
     $this->serviceContainer = $context->getServiceContainer();
     $this->initialize();
 }