Merge branch 'maint/7.0'
[ninja.git] / application / vendor / swiftmailer / classes / Swift / Events / CommandEvent.php
blob73eb5850f0ce78f4a72003836454d5b8ade67ba3
1 <?php
3 /*
4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
9 */
11 //@require 'Swift/Events/EventObject.php';
12 //@require 'Swift/Transport.php';
14 /**
15 * Generated when a command is sent over an SMTP connection.
16 * @package Swift
17 * @subpackage Events
18 * @author Chris Corbyn
20 class Swift_Events_CommandEvent extends Swift_Events_EventObject
23 /**
24 * The command sent to the server.
25 * @var string
27 private $_command;
29 /**
30 * An array of codes which a successful response will contain.
31 * @var int[]
33 private $_successCodes = array();
35 /**
36 * Create a new CommandEvent for $source with $command.
37 * @param Swift_Transport $source
38 * @param string $command
39 * @param array $successCodes
41 public function __construct(Swift_Transport $source,
42 $command, $successCodes = array())
44 parent::__construct($source);
45 $this->_command = $command;
46 $this->_successCodes = $successCodes;
49 /**
50 * Get the command which was sent to the server.
51 * @return string
53 public function getCommand()
55 return $this->_command;
58 /**
59 * Get the numeric response codes which indicate success for this command.
60 * @return int[]
62 public function getSuccessCodes()
64 return $this->_successCodes;