App类的invokeMethod和invokeFunction方法变为public

并且bindParams方法支持按顺序绑定
This commit is contained in:
thinkphp
2016-02-04 12:56:03 +08:00
parent ae1a86f7b2
commit cdbb245b30
2 changed files with 15 additions and 9 deletions

View File

@@ -357,13 +357,14 @@ class Loader
$module = '.' != $info['dirname'] ? $info['dirname'] : CONTROLLER_NAME;
$class = self::controller($module, $layer);
if ($class) {
if (is_string($vars)) {
parse_str($vars, $vars);
if (is_scalar($vars)) {
if (strpos($vars, '=')) {
parse_str($vars, $vars);
} else {
$vars = [$vars];
}
}
$method = new \ReflectionMethod($class, $action . Config::get('action_suffix'));
// 记录执行信息
APP_DEBUG && Log::record('[ RUN ] ' . $method->getFileName(), 'info');
return $method->invokeArgs($class, $vars);
return App::invokeMethod([$class, $action . Config::get('action_suffix')], $vars);
}
}
/**