[OPTIMISATION] Optimised router handling - router will now use the order provided when loading routes.

This commit is contained in:
Simon Sessingø
2015-10-27 14:01:19 +01:00
parent f5a32cf520
commit c2cf2334e7
2 changed files with 2 additions and 10 deletions
+2 -2
View File
@@ -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();