aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/Router.php
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/Router.php')
-rw-r--r--bootstrap/Router.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/bootstrap/Router.php b/bootstrap/Router.php
index 34e278c..c78ab8b 100644
--- a/bootstrap/Router.php
+++ b/bootstrap/Router.php
@@ -1,6 +1,6 @@
<?php
-class Router
+final class Router
{
protected $routes = [
'GET' => [],
@@ -26,7 +26,7 @@ class Router
public static function load($file)
{
$router = new static;
- require $file;
+ include $file;
return $router;
}
@@ -35,8 +35,6 @@ class Router
if (is_array($this->routes[$requestType]) && array_key_exists($uri, $this->routes[$requestType])) {
return $this->routes[$requestType][$uri];
}
- // throw new Exception('No route defined for this URI: "'.$uri.'"');
-
die(http_response_code(404));
}
}