This commit is contained in:
as2252258@163.com
2021-04-21 01:49:17 +08:00
parent e48c76e95d
commit 1ee39fee64
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ class Dispatch
* @throws NotFindClassException * @throws NotFindClassException
* @throws ReflectionException * @throws ReflectionException
*/ */
public static function create($handler, $request): static public static function create($handler): static
{ {
$class = new static(); $class = new static();
$class->handler = $handler; $class->handler = $handler;
+1 -3
View File
@@ -127,9 +127,7 @@ class Node extends HttpService
public function createDispatch(): Closure public function createDispatch(): Closure
{ {
return function () { return function () {
return Dispatch::create($this->handler,\request())->dispatch(); return Dispatch::create($this->handler)->dispatch();
return call_user_func($this->handler, ...$dispatchParam);
}; };
} }