取消 CONTROLLER_LAYER MODEL_LAYER VIEW_LAYER VALIDATE_LAYER 常量 增加url_controller_layer 配置参数

This commit is contained in:
thinkphp
2016-06-01 16:34:24 +08:00
parent bebe73e5a7
commit 12196d21b8
11 changed files with 36 additions and 39 deletions

View File

@@ -883,8 +883,8 @@ class Route
$module = APP_MULTI_MODULE ? array_shift($path) : null;
if ($autoSearch) {
// 自动搜索控制器
$dir = APP_PATH . ($module ? $module . DS : '') . CONTROLLER_LAYER;
$suffix = CLASS_APPEND_SUFFIX || Config::get('use_controller_suffix') ? ucfirst(CONTROLLER_LAYER) : '';
$dir = APP_PATH . ($module ? $module . DS : '') . 'controller';
$suffix = CLASS_APPEND_SUFFIX || Config::get('use_controller_suffix') ? 'Controller' : '';
$item = [];
foreach ($path as $val) {
$item[] = array_shift($path);