改名
This commit is contained in:
@@ -121,15 +121,16 @@ class Node extends HttpService
|
|||||||
*/
|
*/
|
||||||
public function createDispatch(): Closure
|
public function createDispatch(): Closure
|
||||||
{
|
{
|
||||||
return static function () {
|
$handler = $this->handler;
|
||||||
|
return static function () use ($handler) {
|
||||||
$dispatchParam = Context::getContext('dispatch-param');
|
$dispatchParam = Context::getContext('dispatch-param');
|
||||||
if (empty($dispatchParam)) {
|
if (empty($dispatchParam)) {
|
||||||
$dispatchParam = [\request()];
|
$dispatchParam = [\request()];
|
||||||
}
|
}
|
||||||
if ($this->handler instanceof Closure) {
|
if ($handler instanceof Closure) {
|
||||||
return call_user_func($this->handler, ...$dispatchParam);
|
return call_user_func($handler, ...$dispatchParam);
|
||||||
}
|
}
|
||||||
return \aop($this->handler, $dispatchParam);
|
return \aop($handler, $dispatchParam);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user