From 0d905eb687d87bbd04b145c5443785b34b506e18 Mon Sep 17 00:00:00 2001 From: Mohammed Moussaoui <42718534+Artister@users.noreply.github.com> Date: Sat, 25 Nov 2023 01:45:02 -0500 Subject: [PATCH] remove RouteGenerator --- lib/Routing/Internal/RouteGenerator.php | 35 ------------------------- 1 file changed, 35 deletions(-) delete mode 100644 lib/Routing/Internal/RouteGenerator.php diff --git a/lib/Routing/Internal/RouteGenerator.php b/lib/Routing/Internal/RouteGenerator.php deleted file mode 100644 index a13693a..0000000 --- a/lib/Routing/Internal/RouteGenerator.php +++ /dev/null @@ -1,35 +0,0 @@ - $placeholder) { - $pattern = preg_replace('%\?%', '\?', $placeholder); - if (isset($params[$token])) { - $urlPattern = preg_replace('%' . $pattern . '%', $params[$token], $urlPattern); - } else if (preg_match('%{[\w]+=([\w]+)}%', $placeholder, $value)) { - $urlPattern = preg_replace('%' . $pattern . '%', $value[1], $urlPattern); - } else if (preg_match('%{[\w]+\?}%', $placeholder)) { - $urlPattern = preg_replace('%/?' . $pattern . '%', '', $urlPattern); - } else { - $urlPattern = 'Error'; - } - } - - return $urlPattern; - } -}