改进Route类

This commit is contained in:
thinkphp
2016-09-09 18:39:48 +08:00
parent f8dfd9278b
commit 68d1240fea

View File

@@ -1003,7 +1003,7 @@ class Route
if (!empty($array[1])) {
self::parseUrlParams($array[1]);
}
return ['type' => 'method', 'method' => [$class, $action], 'params' => []];
return ['type' => 'method', 'method' => [$class, $action]];
}
/**
@@ -1022,7 +1022,7 @@ class Route
if (!empty($array[2])) {
self::parseUrlParams($array[2]);
}
return ['type' => 'method', 'method' => [$namespace . '\\' . $class, $method], 'params' => []];
return ['type' => 'method', 'method' => [$namespace . '\\' . $class, $method]];
}
/**
@@ -1040,7 +1040,7 @@ class Route
if (!empty($array[1])) {
self::parseUrlParams($array[1]);
}
return ['type' => 'controller', 'controller' => $controller . '/' . $action, 'params' => []];
return ['type' => 'controller', 'controller' => $controller . '/' . $action];
}
/**