@@ -22,9 +22,9 @@ |
||
| 22 | 22 | } |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | -require_once SUDA_SYSTEM .'/src/component/loader/Path.php'; |
|
| 26 | -require_once SUDA_SYSTEM .'/src/component/loader/PathTrait.php'; |
|
| 27 | -require_once SUDA_SYSTEM .'/src/component/loader/PathInterface.php'; |
|
| 28 | -require_once SUDA_SYSTEM .'/src/component/loader/IncludeManager.php'; |
|
| 29 | -require_once SUDA_SYSTEM .'/src/component/loader/Loader.php'; |
|
| 30 | -require_once SUDA_SYSTEM .'/src/application/Loader.php'; |
|
| 25 | +require_once SUDA_SYSTEM.'/src/component/loader/Path.php'; |
|
| 26 | +require_once SUDA_SYSTEM.'/src/component/loader/PathTrait.php'; |
|
| 27 | +require_once SUDA_SYSTEM.'/src/component/loader/PathInterface.php'; |
|
| 28 | +require_once SUDA_SYSTEM.'/src/component/loader/IncludeManager.php'; |
|
| 29 | +require_once SUDA_SYSTEM.'/src/component/loader/Loader.php'; |
|
| 30 | +require_once SUDA_SYSTEM.'/src/application/Loader.php'; |
|
@@ -4,15 +4,15 @@ |
||
| 4 | 4 | use suda\application\Loader; |
| 5 | 5 | use suda\application\Request; |
| 6 | 6 | |
| 7 | -require_once __DIR__ .'/loader.php'; |
|
| 7 | +require_once __DIR__.'/loader.php'; |
|
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | |
| 11 | 11 | // 初始化系统加载器 |
| 12 | 12 | $loader = new Loader; |
| 13 | 13 | $loader->register(); |
| 14 | -$loader->addIncludePath(SUDA_SYSTEM .'/src', 'suda'); |
|
| 15 | -$loader->import(SUDA_SYSTEM .'/src/functions.php'); |
|
| 14 | +$loader->addIncludePath(SUDA_SYSTEM.'/src', 'suda'); |
|
| 15 | +$loader->import(SUDA_SYSTEM.'/src/functions.php'); |
|
| 16 | 16 | // 初始化请求 |
| 17 | 17 | $request = Request::buildFromServer(); |
| 18 | 18 | $request->apply(true); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | private function initBaseConfig() |
| 91 | 91 | { |
| 92 | - $this->initConfigIfNotSet('app.route.active', defined('SUDA_ROUTE_GROUPS')? \explode(',', \constant('SUDA_ROUTE_GROUPS')) :['default']); |
|
| 92 | + $this->initConfigIfNotSet('app.route.active', defined('SUDA_ROUTE_GROUPS') ? \explode(',', \constant('SUDA_ROUTE_GROUPS')) : ['default']); |
|
| 93 | 93 | $this->initConfigIfNotSet('app.import', [\constant('SUDA_APP').'/'.'share']); |
| 94 | 94 | $this->initConfigIfNotSet('app.resource', [\constant('SUDA_APP').'/'.'resource']); |
| 95 | 95 | $this->initConfigIfNotSet('app.module.scan-path', [\constant('SUDA_APP').'/'.'modules']); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | private function initTimezone() |
| 118 | 118 | { |
| 119 | - $timezone = defined('DEFAULT_TIMEZONE')?constant('DEFAULT_TIMEZONE'):'PRC'; |
|
| 119 | + $timezone = defined('DEFAULT_TIMEZONE') ?constant('DEFAULT_TIMEZONE') : 'PRC'; |
|
| 120 | 120 | date_default_timezone_set($this->config->get('app.timezone', $timezone)); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function run() |
| 203 | 203 | { |
| 204 | - $className = $this->config->get('app.application', Application::class); |
|
| 204 | + $className = $this->config->get('app.application', Application::class); |
|
| 205 | 205 | $this->application = Runnable::newClassInstance($className); |
| 206 | 206 | $this->application->setContext($this); |
| 207 | 207 | $this->application->setPath($this->path); |