mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[TASK]
- Added support for setups where getallheaders function is not availible. - Made matchDomain method in RouterGroup always return boolean.
This commit is contained in:
@@ -54,7 +54,10 @@ class RouterBase {
|
||||
$route = $routes[$i];
|
||||
|
||||
$route->addSettings($settings);
|
||||
$route->setGroup($group);
|
||||
|
||||
if($backStack) {
|
||||
$route->setGroup($group);
|
||||
}
|
||||
|
||||
if($this->defaultNamespace && !$route->getNamespace()) {
|
||||
$namespace = null;
|
||||
@@ -124,6 +127,12 @@ class RouterBase {
|
||||
|
||||
$route = $this->controllerUrlMap[$i];
|
||||
|
||||
if($route->getGroup() !== null) {
|
||||
if($route->getGroup()->matchDomain($this->request) === false) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$routeMatch = $route->matchRoute($this->request);
|
||||
|
||||
if($routeMatch) {
|
||||
@@ -133,12 +142,6 @@ class RouterBase {
|
||||
continue;
|
||||
}
|
||||
|
||||
if($route->getGroup() !== null) {
|
||||
if($route->getGroup()->matchDomain($this->request) === null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$routeNotAllowed = false;
|
||||
|
||||
$this->loadedRoute = $route;
|
||||
|
||||
Reference in New Issue
Block a user