mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
Development
- Group only loads if prefix matches (if any).
This commit is contained in:
@@ -85,16 +85,18 @@ class RouterBase {
|
||||
|
||||
$this->currentRoute = $route;
|
||||
|
||||
if($route instanceof RouterGroup && is_callable($route->getCallback())) {
|
||||
if($route instanceof RouterGroup && is_callable($route->getCallback()) && $route->matchRoute($this->request)) {
|
||||
|
||||
$group = $route;
|
||||
|
||||
$group->renderRoute($this->request);
|
||||
$mergedSettings = array_merge($settings, $group->getMergeableSettings());
|
||||
|
||||
// Add ExceptionHandler
|
||||
if($group->matchRoute($this->request) && $group->getExceptionHandler() !== null) {
|
||||
if($group->getExceptionHandler() !== null) {
|
||||
$this->exceptionHandlers[] = $route;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->currentRoute = null;
|
||||
@@ -476,8 +478,4 @@ class RouterBase {
|
||||
return static::$instance;
|
||||
}
|
||||
|
||||
public static function reset() {
|
||||
static::$instance = null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user