From e6d95488be4310b8bd85854c541777bb26299658 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Wed, 16 Nov 2022 01:32:48 -0500 Subject: app: Cleanup dead files and organize hierarchy --- bootstrap/Router.php | 6 ++---- bootstrap/Routes.php | 31 ------------------------------- 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 bootstrap/Routes.php (limited to 'bootstrap') 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 @@ [], @@ -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)); } } diff --git a/bootstrap/Routes.php b/bootstrap/Routes.php deleted file mode 100644 index 33576e4..0000000 --- a/bootstrap/Routes.php +++ /dev/null @@ -1,31 +0,0 @@ -get('', '../controllers/index.controller.php'); -$router->get('contact', '../controllers/contact.controller.php'); -$router->get('wall', '../controllers/wall.controller.php'); -$router->get('comments', '../controllers/comments.controller.php'); -$router->get('about', '../controllers/about.controller.php'); -$router->get('hashget', '../controllers/comments.controller.php'); -$router->get('hashover', '../controllers/comments.controller.php'); - -$router->head('', '../controllers/index.controller.php'); -$router->head('contact', '../controllers/contact.controller.php'); -$router->head('wall', '../controllers/wall.controller.php'); -$router->head('comments', '../controllers/comments.controller.php'); -$router->head('hashget', '../controllers/comments.controller.php'); -$router->head('hashover', '../controllers/comments.controller.php'); - -$router->post('contact', '../controllers/contact.controller.php'); -$router->post('hashpost', '../controllers/comments.controller.php'); - -/* backend routes */ - -$router->get('latestajax', '../bootstrap/comments/backend/latest-ajax.php'); -$router->get('countlinkajax', '../bootstrap/comments/backend/count-link-ajax.php'); - -$router->post('commentsajax', '../bootstrap/comments/backend/comments-ajax.php'); -$router->post('formactions', '../bootstrap/comments/backend/form-actions.php'); -$router->post('loadcomments', '../bootstrap/comments/backend/load-comments.php'); -$router->post('likecomment', '../bootstrap/comments/backend/like.php'); -- cgit v1.2.3