This commit is contained in:
2021-07-27 16:22:49 +08:00
parent 4b15596d37
commit 65aaebef0b
+2 -8
View File
@@ -151,11 +151,8 @@ class Node extends HttpService
$callback = [$reflect->getMethod('invoke'), 'invokeArgs'];
return static function () use ($callback, $application, $reflect) {
$dispatchParam = Context::getContext('dispatch-param', [\request()]);
$asp = $reflect->newInstance($application->handler);
if (is_array($application->handler)) {
Snowflake::injectProperty($application->handler[0]);
}
call_user_func($callback, $asp, $dispatchParam);
call_user_func($callback, $reflect->newInstance($application->handler), $dispatchParam);
};
}
@@ -168,9 +165,6 @@ class Node extends HttpService
{
return static function () use ($application) {
$dispatchParam = Context::getContext('dispatch-param', [\request()]);
if (is_array($application->handler)) {
Snowflake::injectProperty($application->handler[0]);
}
return call_user_func($application->handler, ...$dispatchParam);
};
}