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