diff options
| author | winter | 2025-02-23 18:32:09 +0000 |
|---|---|---|
| committer | winter | 2025-02-23 18:32:09 +0000 |
| commit | 261ab1364aa40384b0315be60e78cd89ea7fe661 (patch) | |
| tree | bf114af430c761abfaf33e814e3cf9ba0ed096d2 /Digitigrade/HttpResponseStatus | |
| parent | 1ba56a5b687e6c906c2b24e5b37df119ef5752e3 (diff) | |
implement policies
Diffstat (limited to 'Digitigrade/HttpResponseStatus')
| -rw-r--r-- | Digitigrade/HttpResponseStatus/PolicyRejected.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Digitigrade/HttpResponseStatus/PolicyRejected.php b/Digitigrade/HttpResponseStatus/PolicyRejected.php new file mode 100644 index 0000000..59a4811 --- /dev/null +++ b/Digitigrade/HttpResponseStatus/PolicyRejected.php @@ -0,0 +1,22 @@ +<?php +namespace Digitigrade\HttpResponseStatus; + +use Digitigrade\HttpResponseStatus; +use Digitigrade\Model\FetchableModel; + +class PolicyRejected extends \Exception implements HttpResponseStatus { + public function __construct() { + $this->message = "Object was rejected by one or more of the instance's policies"; + } + + public function httpCode(): int { + return 403; + } + + public function httpReason(): string { + return "Forbidden"; + } + + public function httpHeaders() { + } +}
\ No newline at end of file |
