内核更新,标签的更新

This commit is contained in:
2016-06-29 15:02:59 +08:00
parent c8e979b159
commit c98ca32ede
16 changed files with 354 additions and 342 deletions

View File

@@ -162,7 +162,7 @@ class App
* @param array $params 参数
* @return void
*/
public static function dispatch($dispath, $type = 'module', $params = [])
public static function dispatch($dispatch, $type = 'module', $params = [])
{
self::$dispatch = ['type' => $type, $type => $dispatch, 'params' => $params];
}
@@ -307,7 +307,9 @@ class App
try {
$instance = Loader::controller($controller, $config['url_controller_layer'], $config['controller_suffix'], $config['empty_controller']);
if (is_null($instance)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
// 获取当前操作名
$action = $actionName . $config['action_suffix'];
if (!preg_match('/^[A-Za-z](\w)*$/', $action)) {