summaryrefslogtreecommitdiff
path: root/src/PathSegment.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/PathSegment.php
parentc762531c8679dbb800346174913bfa21917ac0b5 (diff)
generating routes with parameters and tests
Diffstat (limited to 'src/PathSegment.php')
-rw-r--r--src/PathSegment.php13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/PathSegment.php b/src/PathSegment.php
index d55102f..2fc4cbb 100644
--- a/src/PathSegment.php
+++ b/src/PathSegment.php
@@ -29,19 +29,6 @@ class PathSegment
}
}
- public static function makeFromRouteString(string $value): static
- {
- $type = PathSegmentType::Parameter;
- $regex = $type->routeMatchRegex();
- if (preg_match($regex, $value, $matches) === 1) {
- $value = $matches[1];
- }
- else {
- $type = PathSegmentType::Raw;
- }
- return new static($value, $type);
- }
-
public function getContent(): string
{
return match ($this->type) {