[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/ -> ResponseEvent.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   * Generated when a response is received on a SMTP connection.
  13   *
  14   * @author Chris Corbyn
  15   */
  16  class Swift_Events_ResponseEvent extends Swift_Events_EventObject
  17  {
  18      /**
  19       * The overall result.
  20       *
  21       * @var bool
  22       */
  23      private $valid;
  24  
  25      /**
  26       * The response received from the server.
  27       *
  28       * @var string
  29       */
  30      private $response;
  31  
  32      /**
  33       * Create a new ResponseEvent for $source and $response.
  34       *
  35       * @param string $response
  36       * @param bool   $valid
  37       */
  38      public function __construct(Swift_Transport $source, $response, $valid = false)
  39      {
  40          parent::__construct($source);
  41          $this->response = $response;
  42          $this->valid = $valid;
  43      }
  44  
  45      /**
  46       * Get the response which was received from the server.
  47       *
  48       * @return string
  49       */
  50      public function getResponse()
  51      {
  52          return $this->response;
  53      }
  54  
  55      /**
  56       * Get the success status of this Event.
  57       *
  58       * @return bool
  59       */
  60      public function isValid()
  61      {
  62          return $this->valid;
  63      }
  64  }


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