diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | ac836311005458a10dded324420be92f44976332 (patch) | |
| tree | f456556ceac141aaaeeb0093c4438a44b99e7148 /src/Router.php | |
| parent | c762531c8679dbb800346174913bfa21917ac0b5 (diff) | |
generating routes with parameters and tests
Diffstat (limited to 'src/Router.php')
| -rw-r--r-- | src/Router.php | 3 |
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); |
