改名
This commit is contained in:
@@ -120,7 +120,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
if ($handler instanceof Closure) {
|
if ($handler instanceof Closure) {
|
||||||
$handler = Closure::bind($handler, di(Controller::class));
|
$handler = Closure::bind($handler, di(Controller::class));
|
||||||
}
|
}
|
||||||
return $this->tree($path, $handler, $method);
|
return $this->hash($path, $handler, $method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -515,7 +515,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
*/
|
*/
|
||||||
public function dispatch(Request $request): void
|
public function dispatch(Request $request): void
|
||||||
{
|
{
|
||||||
$node = $this->Branch_search($request);
|
$node = $this->find_path($request);
|
||||||
if (!($node instanceof Node)) {
|
if (!($node instanceof Node)) {
|
||||||
$this->response->setFormat(Response::HTML);
|
$this->response->setFormat(Response::HTML);
|
||||||
$this->response->send('<h1 style="text-align: center;">404</h1>');
|
$this->response->send('<h1 style="text-align: center;">404</h1>');
|
||||||
|
|||||||
Reference in New Issue
Block a user