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