改名
This commit is contained in:
@@ -82,20 +82,20 @@ class Node extends HttpService
|
|||||||
$this->handler = $handler;
|
$this->handler = $handler;
|
||||||
}
|
}
|
||||||
if (!empty($this->handler)) {
|
if (!empty($this->handler)) {
|
||||||
$this->callback = Reduce::reduce([$this, 'createDispatch'], $this->annotation($this));
|
$this->callback = Reduce::reduce($this->createDispatch(), $this->annotation($this));
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return Closure
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
|
||||||
*/
|
*/
|
||||||
public function createDispatch(): mixed
|
public function createDispatch(): Closure
|
||||||
{
|
{
|
||||||
return Dispatch::create($this->handler, func_get_args())->dispatch();
|
return function () {
|
||||||
|
return Dispatch::create($this->handler, func_get_args())->dispatch();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -550,8 +550,6 @@ class Node extends HttpService
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
|||||||
Reference in New Issue
Block a user