TransportExceptionEvent.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /*
  3. * This file is part of SwiftMailer.
  4. * (c) 2004-2009 Chris Corbyn
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. /**
  10. * Generated when a TransportException is thrown from the Transport system.
  11. *
  12. * @author Chris Corbyn
  13. */
  14. class Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject
  15. {
  16. /**
  17. * The Exception thrown.
  18. *
  19. * @var Swift_TransportException
  20. */
  21. private $_exception;
  22. /**
  23. * Create a new TransportExceptionEvent for $transport.
  24. *
  25. * @param Swift_Transport $transport
  26. * @param Swift_TransportException $ex
  27. */
  28. public function __construct(Swift_Transport $transport, Swift_TransportException $ex)
  29. {
  30. parent::__construct($transport);
  31. $this->_exception = $ex;
  32. }
  33. /**
  34. * Get the TransportException thrown.
  35. *
  36. * @return Swift_TransportException
  37. */
  38. public function getException()
  39. {
  40. return $this->_exception;
  41. }
  42. }