[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ -> Transport.php (source)

   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   * Sends Messages via an abstract Transport subsystem.
  13   *
  14   * @author Chris Corbyn
  15   */
  16  interface Swift_Transport
  17  {
  18      /**
  19       * Test if this Transport mechanism has started.
  20       *
  21       * @return bool
  22       */
  23      public function isStarted();
  24  
  25      /**
  26       * Start this Transport mechanism.
  27       */
  28      public function start();
  29  
  30      /**
  31       * Stop this Transport mechanism.
  32       */
  33      public function stop();
  34  
  35      /**
  36       * Check if this Transport mechanism is alive.
  37       *
  38       * If a Transport mechanism session is no longer functional, the method
  39       * returns FALSE. It is the responsibility of the developer to handle this
  40       * case and restart the Transport mechanism manually.
  41       *
  42       * @example
  43       *
  44       *   if (!$transport->ping()) {
  45       *      $transport->stop();
  46       *      $transport->start();
  47       *   }
  48       *
  49       * The Transport mechanism will be started, if it is not already.
  50       *
  51       * It is undefined if the Transport mechanism attempts to restart as long as
  52       * the return value reflects whether the mechanism is now functional.
  53       *
  54       * @return bool TRUE if the transport is alive
  55       */
  56      public function ping();
  57  
  58      /**
  59       * Send the given Message.
  60       *
  61       * Recipient/sender data will be retrieved from the Message API.
  62       * The return value is the number of recipients who were accepted for delivery.
  63       *
  64       * This is the responsibility of the send method to start the transport if needed.
  65       *
  66       * @param string[] $failedRecipients An array of failures by-reference
  67       *
  68       * @return int
  69       */
  70      public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null);
  71  
  72      /**
  73       * Register a plugin in the Transport.
  74       */
  75      public function registerPlugin(Swift_Events_EventListener $plugin);
  76  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1