aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/Router.php
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2022-11-16 01:32:48 -0500
committerThedro Neely <thedroneely@gmail.com>2022-11-16 01:32:48 -0500
commite6d95488be4310b8bd85854c541777bb26299658 (patch)
treea77802b60cc2c87414407170fd3528f83fe20638 /bootstrap/Router.php
parent0ca13d03f3bca48f1f50119bbc6887f5c0ce43ed (diff)
downloadedwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.tar.gz
edwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.tar.bz2
edwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.zip
app: Cleanup dead files and organize hierarchy
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));
}
}