aboutsummaryrefslogtreecommitdiffhomepage
path: root/WpfTest/HttpResponseStatus/NoHandlerFound.php
diff options
context:
space:
mode:
Diffstat (limited to 'WpfTest/HttpResponseStatus/NoHandlerFound.php')
-rw-r--r--WpfTest/HttpResponseStatus/NoHandlerFound.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/WpfTest/HttpResponseStatus/NoHandlerFound.php b/WpfTest/HttpResponseStatus/NoHandlerFound.php
new file mode 100644
index 0000000..9ceeb0b
--- /dev/null
+++ b/WpfTest/HttpResponseStatus/NoHandlerFound.php
@@ -0,0 +1,18 @@
+<?php
+namespace WpfTest\HttpResponseStatus;
+
+use WpfTest\HttpResponseStatus;
+
+class NoHandlerFound extends \Exception implements HttpResponseStatus {
+ public function __construct(string $path) {
+ $this->message = "No handler found for path $path";
+ }
+
+ public function httpCode(): int {
+ return 404;
+ }
+
+ public function httpReason(): string {
+ return "Not Found";
+ }
+} \ No newline at end of file