Swift_Mailer::registerPlugin PHP 메소드

registerPlugin() 공개 메소드

Register a plugin using a known unique key (e.g. myPlugin).
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener
    public function registerPlugin(Swift_Events_EventListener $plugin)
    {
        $this->_transport->registerPlugin($plugin);
    }

Usage Example

예제 #1
0
 /**
  * Get mailer
  *
  * @return Swift_Mailer
  */
 public function getMailer()
 {
     if ($this->mailer === null) {
         $this->mailer = Swift_Mailer::newInstance($this->getTransport());
         if (is_int($this->throttle)) {
             $this->mailer->registerPlugin(new Swift_Plugins_ThrottlerPlugin($this->throttle, Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE));
         }
     }
     return $this->mailer;
 }
All Usage Examples Of Swift_Mailer::registerPlugin