TransportExceptionEvent.php 954 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. public function __construct(Swift_Transport $transport, Swift_TransportException $ex)
  26. {
  27. parent::__construct($transport);
  28. $this->exception = $ex;
  29. }
  30. /**
  31. * Get the TransportException thrown.
  32. *
  33. * @return Swift_TransportException
  34. */
  35. public function getException()
  36. {
  37. return $this->exception;
  38. }
  39. }