From 931be5e6dc02a5b01e71b3449edfff6ac44a3ae5 Mon Sep 17 00:00:00 2001
From: filippo.bertilotti <filippobertilotti@gmail.com>
Date: Tue, 07 May 2024 11:05:32 +0200
Subject: [PATCH] routes match (parte 27)

---
 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