改名
This commit is contained in:
@@ -393,13 +393,14 @@ class Router extends HttpService implements RouterInterface
|
|||||||
* @param $method
|
* @param $method
|
||||||
* @return Node|null
|
* @return Node|null
|
||||||
* 查找指定路由
|
* 查找指定路由
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function tree_search(?array $explode, $method): ?Node
|
public function tree_search(?array $explode): ?Node
|
||||||
{
|
{
|
||||||
if (!isset($this->nodes[$method])) {
|
if (!isset($this->nodes['/'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$parent = $this->nodes[$method]['/'];
|
$parent = $this->nodes['/'];
|
||||||
while ($value = array_shift($explode)) {
|
while ($value = array_shift($explode)) {
|
||||||
$node = $parent->findNode($value);
|
$node = $parent->findNode($value);
|
||||||
if (!$node) {
|
if (!$node) {
|
||||||
|
|||||||
Reference in New Issue
Block a user