From b62315aee0d26f98b1c1db083dae4ae73a110fad Mon Sep 17 00:00:00 2001 From: filippo.bertilotti <filippobertilotti@gmail.com> Date: Tue, 07 May 2024 11:29:57 +0200 Subject: [PATCH] implementazione autoload delle class necessarie (parte 30) --- src/router.php | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/router.php b/src/router.php index fbff562..e6dd562 100644 --- a/src/router.php +++ b/src/router.php @@ -9,6 +9,14 @@ "params"=> $params ]; - + + } + public function match (string $path,): array|bool { + foreach ($this->routes as $route) { + if ($route["path"] === $path) { + return $route["params"]; + } + } + return false; } } \ No newline at end of file -- Gitblit v1.8.0