summaryrefslogtreecommitdiff
path: root/src/Router.php
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:32 +0100
commitac836311005458a10dded324420be92f44976332 (patch)
treef456556ceac141aaaeeb0093c4438a44b99e7148 /src/Router.php
parentc762531c8679dbb800346174913bfa21917ac0b5 (diff)
generating routes with parameters and tests
Diffstat (limited to 'src/Router.php')
-rw-r--r--src/Router.php3
1 files changed, 2 insertions, 1 deletions
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);