取消CLASS_APPEND_SUFFIX常量 使用App::$suffix 替代 使用 class_suffix 配置参数设置 use_controller_suffix 配置更改为 controller_suffix Build类run和module方法增加suffix参数

This commit is contained in:
thinkphp
2016-06-15 23:01:10 +08:00
parent 2aa3e4fa5b
commit df99a0cf16
6 changed files with 27 additions and 17 deletions

View File

@@ -462,7 +462,7 @@ class Loader
{
$name = str_replace(['/', '.'], '\\', $name);
$array = explode('\\', $name);
$class = self::parseName(array_pop($array), 1) . (CLASS_APPEND_SUFFIX || $appendSuffix ? ucfirst($layer) : '');
$class = self::parseName(array_pop($array), 1) . (App::$suffix || $appendSuffix ? ucfirst($layer) : '');
$path = $array ? implode('\\', $array) . '\\' : '';
return App::$namespace . '\\' . ($module ? $module . '\\' : '') . $layer . '\\' . $path . $class;
}