改名
This commit is contained in:
@@ -112,13 +112,8 @@ class Router extends HttpService implements RouterInterface
|
|||||||
if ($handler instanceof Closure) {
|
if ($handler instanceof Closure) {
|
||||||
$handler = Closure::bind($handler, new Controller());
|
$handler = Closure::bind($handler, new Controller());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->useTree == ROUTER_TREE) {
|
|
||||||
return $this->tree($path, $handler, $method);
|
|
||||||
} else {
|
|
||||||
return $this->hash($path, $handler, $method);
|
return $this->hash($path, $handler, $method);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -572,9 +567,9 @@ class Router extends HttpService implements RouterInterface
|
|||||||
*/
|
*/
|
||||||
public function find_path(Request $request): ?Node
|
public function find_path(Request $request): ?Node
|
||||||
{
|
{
|
||||||
if ($this->useTree === ROUTER_TREE) {
|
// if ($this->useTree === ROUTER_TREE) {
|
||||||
return $this->Branch_search($request);
|
// return $this->Branch_search($request);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$method = $request->getMethod();
|
$method = $request->getMethod();
|
||||||
$uri = $request->headers->get('request_uri', '/');
|
$uri = $request->headers->get('request_uri', '/');
|
||||||
|
|||||||
Reference in New Issue
Block a user