mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-08-30 12:45:32 +08:00
改进操作获取
This commit is contained in:
@@ -581,6 +581,13 @@ class App
|
||||
if (is_callable([$instance, $action])) {
|
||||
// 执行操作方法
|
||||
$call = [$instance, $action];
|
||||
// 严格获取当前操作方法名
|
||||
$reflect = new \ReflectionMethod($instance, $action);
|
||||
$methodName = $reflect->getName();
|
||||
$suffix = $config['action_suffix'];
|
||||
$actionName = $suffix ? substr($methodName, 0, -strlen($suffix)) : $methodName;
|
||||
$request->action($actionName);
|
||||
|
||||
} elseif (is_callable([$instance, '_empty'])) {
|
||||
// 空操作
|
||||
$call = [$instance, '_empty'];
|
||||
|
||||
Reference in New Issue
Block a user