HttpResponseException.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Webservice\Exception;
  6. /**
  7. * Temando Webservice Response Exception
  8. *
  9. * @package Temando\Shipping\Webservice
  10. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  11. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  12. * @link http://www.temando.com/
  13. */
  14. class HttpResponseException extends HttpException
  15. {
  16. /**
  17. * @var string[]
  18. */
  19. private $responseHeaders;
  20. /**
  21. * HttpResponseException constructor.
  22. * @param string $message
  23. * @param int $code
  24. * @param \Exception|null $previous
  25. * @param string $responseHeaders
  26. */
  27. public function __construct($message = "", $code = 0, \Exception $previous = null, $responseHeaders = '')
  28. {
  29. $this->responseHeaders = $responseHeaders;
  30. parent::__construct($message, $code, $previous);
  31. }
  32. /**
  33. * @return \string[]
  34. */
  35. public function getResponseHeaders()
  36. {
  37. return $this->responseHeaders;
  38. }
  39. }