Skip to content

Commit

Permalink
应用类库自定义命名空间采用APP_NAMESPACE常量订阅
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Apr 28, 2017
1 parent e2ea429 commit 02f8e8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/think/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ public static function module($result, $config, $convert = null)
public static function initCommon()
{
if (empty(self::$init)) {
$array = include CONF_PATH . 'config' . CONF_EXT;
// 注册应用命名空间
self::$namespace = $array['app_namespace'];
if (defined('APP_NAMESPACE')) {
self::$namespace = APP_NAMESPACE;
}
Loader::addNamespace(self::$namespace, APP_PATH);

// 初始化应用
Expand Down

0 comments on commit 02f8e8a

Please sign in to comment.