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.
11 //@require 'Swift/Events/EventObject.php';
12 //@require 'Swift/Transport.php';
15 * Generated when a command is sent over an SMTP connection.
18 * @author Chris Corbyn
20 class Swift_Events_CommandEvent
extends Swift_Events_EventObject
24 * The command sent to the server.
30 * An array of codes which a successful response will contain.
33 private $_successCodes = array();
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;
50 * Get the command which was sent to the server.
53 public function getCommand()
55 return $this->_command
;
59 * Get the numeric response codes which indicate success for this command.
62 public function getSuccessCodes()
64 return $this->_successCodes
;