PaymentRequired.php 614 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. namespace Sabre\DAV\Exception;
  4. use Sabre\DAV;
  5. /**
  6. * Payment Required.
  7. *
  8. * The PaymentRequired exception may be thrown in a case where a user must pay
  9. * to access a certain resource or operation.
  10. *
  11. * @copyright Copyright (C) fruux GmbH (https://fruux.com/)
  12. * @author Evert Pot (http://evertpot.com/)
  13. * @license http://sabre.io/license/ Modified BSD License
  14. */
  15. class PaymentRequired extends DAV\Exception
  16. {
  17. /**
  18. * Returns the HTTP statuscode for this exception.
  19. *
  20. * @return int
  21. */
  22. public function getHTTPCode()
  23. {
  24. return 402;
  25. }
  26. }