mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
改进控制器的空操作方法调用 改进Rest控制器的_empty方法
This commit is contained in:
@@ -337,9 +337,10 @@ class App
|
||||
} catch (\ReflectionException $e) {
|
||||
// 操作不存在
|
||||
if (method_exists($instance, '_empty')) {
|
||||
$method = new \ReflectionMethod($instance, '_empty');
|
||||
$data = $method->invokeArgs($instance, [$action, '']);
|
||||
self::$debug && Log::record('[ RUN ] ' . $method->__toString(), 'info');
|
||||
$reflect = new \ReflectionMethod($instance, '_empty');
|
||||
$args = self::bindParams($reflect, Request::instance()->param());
|
||||
$data = $reflect->invokeArgs($instance, [$action, $args]);
|
||||
self::$debug && Log::record('[ RUN ] ' . $reflect->__toString(), 'info');
|
||||
} else {
|
||||
throw new HttpException(404, 'method not exists:' . (new \ReflectionClass($instance))->getName() . '->' . $action);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user