HttpResponseException.php 790B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace Illuminate\Http\Exceptions;
  3. use RuntimeException;
  4. use Symfony\Component\HttpFoundation\Response;
  5. class HttpResponseException extends RuntimeException
  6. {
  7. /**
  8. * The underlying response instance.
  9. *
  10. * @var \Symfony\Component\HttpFoundation\Response
  11. */
  12. protected $response;
  13. /**
  14. * Create a new HTTP response exception instance.
  15. *
  16. * @param \Symfony\Component\HttpFoundation\Response $response
  17. * @return void
  18. */
  19. public function __construct(Response $response)
  20. {
  21. $this->response = $response;
  22. }
  23. /**
  24. * Get the underlying response instance.
  25. *
  26. * @return \Symfony\Component\HttpFoundation\Response
  27. */
  28. public function getResponse()
  29. {
  30. return $this->response;
  31. }
  32. }