PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/swift/lib/classes/Swift/Events/ResponseEvent.php

http://zoop.googlecode.com/
PHP | 65 lines | 20 code | 9 blank | 36 comment | 0 complexity | 0bc7229f38bc15ad4490c961d216347c MD5 | raw file
 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
13/**
14 * Generated when a response is received on a SMTP connection.
15 * @package Swift
16 * @subpackage Events
17 * @author Chris Corbyn
18 */
19class Swift_Events_ResponseEvent extends Swift_Events_EventObject
20{
21  
22  /**
23   * The overall result.
24   * @var boolean
25   */
26  private $_valid;
27  
28  /**
29   * The response received from the server.
30   * @var string
31   */
32  private $_response;
33  
34  /**
35   * Create a new ResponseEvent for $source and $response.
36   * @param Swift_Transport $source
37   * @param string $response
38   * @param boolean $valid
39   */
40  public function __construct(Swift_Transport $source, $response, $valid = false)
41  {
42    parent::__construct($source);
43    $this->_response = $response;
44    $this->_valid = $valid;
45  }
46  
47  /**
48   * Get the response which was received from the server.
49   * @return string
50   */
51  public function getResponse()
52  {
53    return $this->_response;
54  }
55  
56  /**
57   * Get the success status of this Event.
58   * @return boolean
59   */
60  public function isValid()
61  {
62    return $this->_valid;
63  }
64  
65}