mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[BUGFIX] Fixed nested groups not merging settings to routes
This commit is contained in:
@@ -88,4 +88,18 @@ class RouterGroup extends RouterEntry {
|
||||
return $this->domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $settings
|
||||
* @return self
|
||||
*/
|
||||
public function addSettings(array $settings = null) {
|
||||
if(isset($settings['namespace'])) {
|
||||
unset($settings['namespace']);
|
||||
}
|
||||
if(is_array($settings)) {
|
||||
$this->settings = array_merge($this->settings, $settings);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user