[ Index ]

MailPress 544

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

title

Body

[close]

/mp-includes/Swiftmailer/classes/Swift/Events/ -> CommandEvent.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 command is sent over an SMTP connection.
  13   *
  14   * @author Chris Corbyn
  15   */
  16  class Swift_Events_CommandEvent extends Swift_Events_EventObject
  17  {
  18      /**
  19       * The command sent to the server.
  20       *
  21       * @var string
  22       */
  23      private $_command;
  24  
  25      /**
  26       * An array of codes which a successful response will contain.
  27       *
  28       * @var integer[]
  29       */
  30      private $_successCodes = array();
  31  
  32      /**
  33       * Create a new CommandEvent for $source with $command.
  34       *
  35       * @param Swift_Transport $source
  36       * @param string          $command
  37       * @param array           $successCodes
  38       */
  39      public function __construct(Swift_Transport $source, $command, $successCodes = array())
  40      {
  41          parent::__construct($source);
  42          $this->_command = $command;
  43          $this->_successCodes = $successCodes;
  44      }
  45  
  46      /**
  47       * Get the command which was sent to the server.
  48       *
  49       * @return string
  50       */
  51      public function getCommand()
  52      {
  53          return $this->_command;
  54      }
  55  
  56      /**
  57       * Get the numeric response codes which indicate success for this command.
  58       *
  59       * @return integer[]
  60       */
  61      public function getSuccessCodes()
  62      {
  63          return $this->_successCodes;
  64      }
  65  }


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1