aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/HttpResponseStatus/NoHandlerFound.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/HttpResponseStatus/NoHandlerFound.php')
-rw-r--r--Digitigrade/HttpResponseStatus/NoHandlerFound.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/Digitigrade/HttpResponseStatus/NoHandlerFound.php b/Digitigrade/HttpResponseStatus/NoHandlerFound.php
new file mode 100644
index 0000000..871b873
--- /dev/null
+++ b/Digitigrade/HttpResponseStatus/NoHandlerFound.php
@@ -0,0 +1,18 @@
+<?php
+namespace Digitigrade\HttpResponseStatus;
+
+use Digitigrade\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