mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 02:30:09 +03:00
Bugfixes
This commit is contained in:
@@ -136,7 +136,6 @@ class RouterBase
|
||||
|
||||
protected function processRoutes(array $routes, array $settings = array(), array $prefixes = array(), RouterEntry $parent = null)
|
||||
{
|
||||
|
||||
// Loop through each route-request
|
||||
/* @var $route RouterEntry */
|
||||
foreach ($routes as $route) {
|
||||
@@ -144,10 +143,14 @@ class RouterBase
|
||||
$newPrefixes = $prefixes;
|
||||
$newSettings = $settings;
|
||||
|
||||
if($parent !== null) {
|
||||
if ($parent !== null) {
|
||||
$route->setParent($parent);
|
||||
}
|
||||
|
||||
if (count($settings)) {
|
||||
$route->merge($settings);
|
||||
}
|
||||
|
||||
if ($route instanceof RouterGroup) {
|
||||
|
||||
if ($route->getCallback() !== null && is_callable($route->getCallback())) {
|
||||
@@ -163,15 +166,10 @@ class RouterBase
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($route instanceof RouterGroup) {
|
||||
$newPrefixes[] = trim($route->getPrefix(), '/');
|
||||
$newSettings = array_merge($settings, $route->toArray());
|
||||
} else {
|
||||
if (count($settings)) {
|
||||
$route->merge($settings);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($route instanceof ILoadableRoute) {
|
||||
@@ -181,7 +179,6 @@ class RouterBase
|
||||
}
|
||||
|
||||
$this->controllerUrlMap[] = $route;
|
||||
|
||||
}
|
||||
|
||||
if (count($this->backStack) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user