HttpException.php 788 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\HTTP;
  4. /**
  5. * An exception representing a HTTP error.
  6. *
  7. * This can be used as a generic exception in your application, if you'd like
  8. * to map HTTP errors to exceptions.
  9. *
  10. * If you'd like to use this, create a new exception class, extending Exception
  11. * and implementing this interface.
  12. *
  13. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  14. * @author Evert Pot (http://evertpot.com/)
  15. * @license http://sabre.io/license/ Modified BSD License
  16. */
  17. interface HttpException
  18. {
  19. /**
  20. * The http status code for the error.
  21. *
  22. * This may either be just the number, or a number and a human-readable
  23. * message, separated by a space.
  24. *
  25. * @return string|null
  26. */
  27. public function getHttpStatus();
  28. }