Avail feature updated
[ninja.git] / application / vendor / swiftmailer / classes / Swift / Events / ResponseEvent.php
blobaddf9e7a8aaf97a7fbcd2d0c015011b8953c38e1
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';
13 /**
14 * Generated when a response is received on a SMTP connection.
15 * @package Swift
16 * @subpackage Events
17 * @author Chris Corbyn
19 class Swift_Events_ResponseEvent extends Swift_Events_EventObject
22 /**
23 * The overall result.
24 * @var boolean
26 private $_valid;
28 /**
29 * The response received from the server.
30 * @var string
32 private $_response;
34 /**
35 * Create a new ResponseEvent for $source and $response.
36 * @param Swift_Transport $source
37 * @param string $response
38 * @param boolean $valid
40 public function __construct(Swift_Transport $source, $response, $valid = false)
42 parent::__construct($source);
43 $this->_response = $response;
44 $this->_valid = $valid;
47 /**
48 * Get the response which was received from the server.
49 * @return string
51 public function getResponse()
53 return $this->_response;
56 /**
57 * Get the success status of this Event.
58 * @return boolean
60 public function isValid()
62 return $this->_valid;