Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

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