Swift_Transport::stop PHP Method

stop() public method

Stop this Transport mechanism.
public stop ( )
    public function stop();

Usage Example

 public function postTask(Worker $worker, array $options = null)
 {
     if ($worker instanceof MailerAwareWorker) {
         if ($this->mailer && $this->transport) {
             //Flush the mailer queue, this isn't normally done until the command execution finishes
             $this->mailer->getTransport()->getSpool()->flushQueue($this->transport);
             $this->transport->stop();
             $this->logger->info('Flushed mail queue');
         }
     }
 }
All Usage Examples Of Swift_Transport::stop