From ac836311005458a10dded324420be92f44976332 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: generating routes with parameters and tests --- src/Router.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Router.php') diff --git a/src/Router.php b/src/Router.php index 4463150..1c5e087 100644 --- a/src/Router.php +++ b/src/Router.php @@ -126,7 +126,8 @@ class Router $seg = $this->root(); while (($v = array_shift($pathSplit)) !== null) { - $seg = $seg->child($v); + $typeMatch = PathSegmentType::matchRouteString($v); + $seg = $seg->child($typeMatch->value, $typeMatch->type); } $route = new Route($method, $handler); -- cgit v1.2.3