mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进Route类
This commit is contained in:
@@ -1057,7 +1057,7 @@ class Route
|
|||||||
if (!empty($array[1])) {
|
if (!empty($array[1])) {
|
||||||
self::parseUrlParams($array[1]);
|
self::parseUrlParams($array[1]);
|
||||||
}
|
}
|
||||||
return ['type' => 'method', 'method' => [$class, $action]];
|
return ['type' => 'method', 'method' => [$class, $action], 'var' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1077,7 +1077,7 @@ class Route
|
|||||||
if (!empty($array[2])) {
|
if (!empty($array[2])) {
|
||||||
self::parseUrlParams($array[2]);
|
self::parseUrlParams($array[2]);
|
||||||
}
|
}
|
||||||
return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method]];
|
return ['type' => 'method', 'method' => [$namespace . '\\' . Loader::parseName($class, 1), $method], 'var' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1096,7 +1096,7 @@ class Route
|
|||||||
if (!empty($array[1])) {
|
if (!empty($array[1])) {
|
||||||
self::parseUrlParams($array[1]);
|
self::parseUrlParams($array[1]);
|
||||||
}
|
}
|
||||||
return ['type' => 'controller', 'controller' => $controller . '/' . $action];
|
return ['type' => 'controller', 'controller' => $controller . '/' . $action, 'var' => []];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user