aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/HttpReturnStatus/NotFound.php
diff options
context:
space:
mode:
authorwinter2024-12-06 20:43:26 +0000
committerwinter2024-12-06 20:43:26 +0000
commite1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (patch)
tree4ef08af2b4051d433bb929d5162474ac6777cab1 /WpfTest/HttpReturnStatus/NotFound.php
initial commit
hardcoded functionality mostly!
Diffstat (limited to 'WpfTest/HttpReturnStatus/NotFound.php')
-rw-r--r--WpfTest/HttpReturnStatus/NotFound.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/WpfTest/HttpReturnStatus/NotFound.php b/WpfTest/HttpReturnStatus/NotFound.php
new file mode 100644
index 0000000..eef23b3
--- /dev/null
+++ b/WpfTest/HttpReturnStatus/NotFound.php
@@ -0,0 +1,18 @@
+<?php
+namespace WpfTest\HttpReturnStatus;
+
+use WpfTest\HttpReturnStatus;
+
+class NotFound extends \Exception implements HttpReturnStatus {
+ public function __construct(?string $reason) {
+ $this->message = $reason ?? 'Request was handled but no appropriate resource found';
+ }
+
+ public function httpCode(): int {
+ return 404;
+ }
+
+ public function httpReason(): string {
+ return "Not Found";
+ }
+} \ No newline at end of file