改名
This commit is contained in:
@@ -80,13 +80,13 @@ class Router extends Application implements RouterInterface
|
|||||||
$this->nodes[$method] = [];
|
$this->nodes[$method] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$useTree = Config::get('router', false, ROUTER_HASH);
|
// $useTree = Config::get('router', false, ROUTER_HASH);
|
||||||
var_dump($useTree);
|
// var_dump($useTree);
|
||||||
if ($useTree == ROUTER_TREE) {
|
// if ($useTree == ROUTER_TREE) {
|
||||||
return $this->tree($path, $handler, $method);
|
return $this->tree($path, $handler, $method);
|
||||||
} else {
|
// } else {
|
||||||
return $this->hash($path, $handler, $method);
|
// return $this->hash($path, $handler, $method);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -504,15 +504,11 @@ class Router extends Application implements RouterInterface
|
|||||||
*/
|
*/
|
||||||
private function find_path(Request $request): ?Node
|
private function find_path(Request $request): ?Node
|
||||||
{
|
{
|
||||||
|
return $this->Branch_search($request);
|
||||||
|
|
||||||
$method = $request->getMethod();
|
$method = $request->getMethod();
|
||||||
$uri = $request->headers->get('request_uri', '/');
|
$uri = $request->headers->get('request_uri', '/');
|
||||||
|
|
||||||
$context = Config::get('router', false, ROUTER_HASH);
|
|
||||||
var_dump($context);
|
|
||||||
if ($context === ROUTER_TREE) {
|
|
||||||
return $this->Branch_search($request);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($this->nodes[$method])) {
|
if (!isset($this->nodes[$method])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user