mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 10:40:18 +03:00
Removed namespace from groups
This commit is contained in:
@@ -256,7 +256,6 @@ class SimpleRouter
|
||||
$group = new RouteGroup();
|
||||
$group->setCallback($callback);
|
||||
$group->setSettings($settings);
|
||||
$group = static::addDefaultNamespace($group);
|
||||
|
||||
static::router()->addRoute($group);
|
||||
|
||||
@@ -284,7 +283,6 @@ class SimpleRouter
|
||||
$group = new RoutePartialGroup();
|
||||
$group->setSettings($settings);
|
||||
$group->setCallback($callback);
|
||||
$group = static::addDefaultNamespace($group);
|
||||
|
||||
static::router()->addRoute($group);
|
||||
|
||||
@@ -513,12 +511,6 @@ class SimpleRouter
|
||||
{
|
||||
if (static::$defaultNamespace !== null) {
|
||||
|
||||
if ($route instanceof IGroupRoute) {
|
||||
$route->setNamespace(static::$defaultNamespace . '\\' . ltrim($route->getNamespace(), '\\'));
|
||||
|
||||
return $route;
|
||||
}
|
||||
|
||||
$callback = $route->getCallback();
|
||||
|
||||
/* Only add default namespace on relative callbacks */
|
||||
|
||||
Reference in New Issue
Block a user