diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2025-08-12 18:02:39 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2025-08-12 18:02:45 +0200 |
commit | 5ab89da146929734a39c7a55619b8bf8298ab832 (patch) | |
tree | 48746c1320b274f3c00f7c45aa7e512743e1ef75 /src/Router.php | |
parent | 1fc29c6029cfa8c7dce5535ff9cfb2daaa6427e0 (diff) |
implement phpunit integration tests
Diffstat (limited to 'src/Router.php')
-rw-r--r-- | src/Router.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Router.php b/src/Router.php index 319d5e2..e0b09ad 100644 --- a/src/Router.php +++ b/src/Router.php @@ -24,6 +24,10 @@ class Router $this->addRoutes(); } + /** + * match the current url against the routes. + * also add preflight CORS headers on OPTIONS requests. + */ public function run(): Response { $request = Request::createFromGlobals(); @@ -55,6 +59,9 @@ class Router } } + /** + * add routes from the routes file + */ private function addRoutes(): void { $routes = include_once(__DIR__ . "/routes.php"); |