We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acaeff3 commit a4c350eCopy full SHA for a4c350e
src/Routes.php
@@ -20,6 +20,18 @@ public function __construct(
20
) {
21
}
22
23
+ public function __clone(): void
24
+ {
25
+ $groups = $this->groups;
26
+ $routes = $this->routes;
27
+
28
+ $this->routes = [];
29
+ $this->groups = [];
30
31
+ foreach ($routes as $k => $route) $this->routes[$k] = clone $route;
32
+ foreach ($groups as $k => $group) $this->groups[$k] = $group::copy($this, $group);
33
+ }
34
35
public function match(RouteMap $routes, string $uri, string $requestMethod):? RouteRecord
36
{
37
if ($routes instanceof Matcher && $routes !== $this) {
0 commit comments