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: * Generated when a TransportException is thrown from the Transport system.
13: * @package Swift
14: * @subpackage Events
15: * @author Chris Corbyn
16: */
17: class Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject
18: {
19: /**
20: * The Exception thrown.
21: * @var Swift_TransportException
22: */
23: private $_exception;
24:
25: /**
26: * Create a new TransportExceptionEvent for $transport.
27: * @param Swift_Transport $transport
28: * @param Swift_TransportException $ex
29: */
30: public function __construct(Swift_Transport $transport, Swift_TransportException $ex)
31: {
32: parent::__construct($transport);
33: $this->_exception = $ex;
34: }
35:
36: /**
37: * Get the TransportException thrown.
38: * @return Swift_TransportException
39: */
40: public function getException()
41: {
42: return $this->_exception;
43: }
44: }
45: