mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[OPTIMISATION] Optimised router handling - router will now use the order provided when loading routes.
This commit is contained in:
@@ -49,7 +49,7 @@ class RouterRoute extends RouterEntry {
|
||||
// Check if url parameter count matches
|
||||
if(stripos($url, $routeMatch) === 0) {
|
||||
|
||||
$matches = true;
|
||||
$matches = (count(explode('/', rtrim($url, '/'))) == count(explode('/', rtrim($route, '/'))));
|
||||
|
||||
if($this->regexMatch) {
|
||||
$parameters = $this->parseParameters($url, true, $this->regexMatch);
|
||||
@@ -62,7 +62,7 @@ class RouterRoute extends RouterEntry {
|
||||
} else {
|
||||
|
||||
$url = explode('/', $url);
|
||||
$route = explode('/', $route);
|
||||
$route = explode('/', rtrim($route, '/'));
|
||||
|
||||
$parameters = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user