vendor/swiftmailer/lib/classes/Swift/Transport.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     1 <?php
       
     2 
       
     3 /*
       
     4  * This file is part of SwiftMailer.
       
     5  * (c) 2004-2009 Chris Corbyn
       
     6  *
       
     7  * For the full copyright and license information, please view the LICENSE
       
     8  * file that was distributed with this source code.
       
     9  */
       
    10 
       
    11 
       
    12 /**
       
    13  * Sends Messages via an abstract Transport subsystem.
       
    14  * 
       
    15  * @package Swift
       
    16  * @subpackage Transport
       
    17  * @author Chris Corbyn
       
    18  */
       
    19 interface Swift_Transport
       
    20 {
       
    21 
       
    22   /**
       
    23    * Test if this Transport mechanism has started.
       
    24    * 
       
    25    * @return boolean
       
    26    */
       
    27   public function isStarted();
       
    28   
       
    29   /**
       
    30    * Start this Transport mechanism.
       
    31    */
       
    32   public function start();
       
    33   
       
    34   /**
       
    35    * Stop this Transport mechanism.
       
    36    */
       
    37   public function stop();
       
    38   
       
    39   /**
       
    40    * Send the given Message.
       
    41    * 
       
    42    * Recipient/sender data will be retreived from the Message API.
       
    43    * The return value is the number of recipients who were accepted for delivery.
       
    44    * 
       
    45    * @param Swift_Mime_Message $message
       
    46    * @param string[] &$failedRecipients to collect failures by-reference
       
    47    * @return int
       
    48    */
       
    49   public function send(Swift_Mime_Message $message, &$failedRecipients = null);
       
    50   
       
    51   /**
       
    52    * Register a plugin in the Transport.
       
    53    * 
       
    54    * @param Swift_Events_EventListener $plugin
       
    55    */
       
    56   public function registerPlugin(Swift_Events_EventListener $plugin);
       
    57   
       
    58 }