From 4ccb4c6bdf5ba36826861e6682f74f808b7f6c38 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 25 May 2016 12:04:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E5=AE=9A=E4=B9=89=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Hook.php | 3 ++ library/think/Url.php | 4 ++ mode/common.php | 89 ++++++++++++++++++++------------------- mode/sae.php | 95 ++++++++++++++++++++++-------------------- 4 files changed, 102 insertions(+), 89 deletions(-) diff --git a/library/think/Hook.php b/library/think/Hook.php index b789d08a..b2cb0471 100644 --- a/library/think/Hook.php +++ b/library/think/Hook.php @@ -11,6 +11,9 @@ namespace think; +use think\Debug; +use think\Log; + class Hook { diff --git a/library/think/Url.php b/library/think/Url.php index bd895c25..de222ea5 100644 --- a/library/think/Url.php +++ b/library/think/Url.php @@ -11,6 +11,10 @@ namespace think; +use think\Cache; +use think\Config; +use think\Route; + class Url { /** diff --git a/mode/common.php b/mode/common.php index e29cffdc..b56e1f06 100644 --- a/mode/common.php +++ b/mode/common.php @@ -26,48 +26,51 @@ return [ // 别名定义 'alias' => [ - 'think\App' => CORE_PATH . 'App' . EXT, - 'think\Build' => CORE_PATH . 'Build' . EXT, - 'think\Cache' => CORE_PATH . 'Cache' . EXT, - 'think\Config' => CORE_PATH . 'Config' . EXT, - 'think\Console' => CORE_PATH . 'Console' . EXT, - 'think\Controller' => CORE_PATH . 'Controller' . EXT, - 'think\Cookie' => CORE_PATH . 'Cookie' . EXT, - 'think\Db' => CORE_PATH . 'Db' . EXT, - 'think\Debug' => CORE_PATH . 'Debug' . EXT, - 'think\Error' => CORE_PATH . 'Error' . EXT, - 'think\Exception' => CORE_PATH . 'Exception' . EXT, - 'think\exception\DbException' => CORE_PATH . 'exception' . DS . 'DbException' . EXT, - 'think\exception\PDOException' => CORE_PATH . 'exception' . DS . 'PDOException' . EXT, - 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, - 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, - 'think\exception\NotFoundException' => CORE_PATH . 'exception' . DS . 'NotFoundException' . EXT, - 'think\File' => CORE_PATH . 'File' . EXT, - 'think\Hook' => CORE_PATH . 'Hook' . EXT, - 'think\Input' => CORE_PATH . 'Input' . EXT, - 'think\Lang' => CORE_PATH . 'Lang' . EXT, - 'think\Log' => CORE_PATH . 'Log' . EXT, - 'think\Model' => CORE_PATH . 'Model' . EXT, - 'think\model\Relation' => CORE_PATH . 'model' . DS . 'Relation' . EXT, - 'think\model\Merge' => CORE_PATH . 'model' . DS . 'Merge' . EXT, - 'think\model\Pivot' => CORE_PATH . 'model' . DS . 'Pivot' . EXT, - 'think\Response' => CORE_PATH . 'Response' . EXT, - 'think\Process' => CORE_PATH . 'Process' . EXT, - 'think\Route' => CORE_PATH . 'Route' . EXT, - 'think\Session' => CORE_PATH . 'Session' . EXT, - 'think\Template' => CORE_PATH . 'Template' . EXT, - 'think\Url' => CORE_PATH . 'Url' . EXT, - 'think\Validate' => CORE_PATH . 'Validate' . EXT, - 'think\View' => CORE_PATH . 'View' . EXT, - 'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT, - 'think\db\connector\Mysql' => CORE_PATH . 'db' . DS . 'connector' . DS . 'Mysql' . EXT, - 'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT, - 'think\db\Builder\Mysql' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Mysql' . EXT, - 'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT, - 'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . EXT, - 'think\view\driver\Php' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Php' . EXT, - 'think\template\driver\File' => CORE_PATH . 'template' . DS . 'driver' . DS . 'File' . EXT, - 'think\log\driver\File' => CORE_PATH . 'log' . DS . 'driver' . DS . 'File' . EXT, - 'think\cache\driver\File' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'File' . EXT, + 'think\App' => CORE_PATH . 'App' . EXT, + 'think\Build' => CORE_PATH . 'Build' . EXT, + 'think\Cache' => CORE_PATH . 'Cache' . EXT, + 'think\Config' => CORE_PATH . 'Config' . EXT, + 'think\Console' => CORE_PATH . 'Console' . EXT, + 'think\Controller' => CORE_PATH . 'Controller' . EXT, + 'think\Cookie' => CORE_PATH . 'Cookie' . EXT, + 'think\Db' => CORE_PATH . 'Db' . EXT, + 'think\Debug' => CORE_PATH . 'Debug' . EXT, + 'think\Error' => CORE_PATH . 'Error' . EXT, + 'think\Exception' => CORE_PATH . 'Exception' . EXT, + 'think\exception\DbException' => CORE_PATH . 'exception' . DS . 'DbException' . EXT, + 'think\exception\Handle' => CORE_PATH . 'exception' . DS . 'Handle' . EXT, + 'think\exception\HttpException' => CORE_PATH . 'exception' . DS . 'HttpException' . EXT, + 'think\exception\HttpResponseException' => CORE_PATH . 'exception' . DS . 'HttpResponseException' . EXT, + 'think\exception\PDOException' => CORE_PATH . 'exception' . DS . 'PDOException' . EXT, + 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, + 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, + 'think\exception\ThrowableError' => CORE_PATH . 'exception' . DS . 'ThrowableError' . EXT, + 'think\File' => CORE_PATH . 'File' . EXT, + 'think\Hook' => CORE_PATH . 'Hook' . EXT, + 'think\Input' => CORE_PATH . 'Input' . EXT, + 'think\Lang' => CORE_PATH . 'Lang' . EXT, + 'think\Log' => CORE_PATH . 'Log' . EXT, + 'think\Model' => CORE_PATH . 'Model' . EXT, + 'think\model\Relation' => CORE_PATH . 'model' . DS . 'Relation' . EXT, + 'think\model\Merge' => CORE_PATH . 'model' . DS . 'Merge' . EXT, + 'think\model\Pivot' => CORE_PATH . 'model' . DS . 'Pivot' . EXT, + 'think\Response' => CORE_PATH . 'Response' . EXT, + 'think\Process' => CORE_PATH . 'Process' . EXT, + 'think\Route' => CORE_PATH . 'Route' . EXT, + 'think\Session' => CORE_PATH . 'Session' . EXT, + 'think\Template' => CORE_PATH . 'Template' . EXT, + 'think\Url' => CORE_PATH . 'Url' . EXT, + 'think\Validate' => CORE_PATH . 'Validate' . EXT, + 'think\View' => CORE_PATH . 'View' . EXT, + 'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT, + 'think\db\connector\Mysql' => CORE_PATH . 'db' . DS . 'connector' . DS . 'Mysql' . EXT, + 'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT, + 'think\db\Builder\Mysql' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Mysql' . EXT, + 'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT, + 'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . EXT, + 'think\view\driver\Php' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Php' . EXT, + 'think\template\driver\File' => CORE_PATH . 'template' . DS . 'driver' . DS . 'File' . EXT, + 'think\log\driver\File' => CORE_PATH . 'log' . DS . 'driver' . DS . 'File' . EXT, + 'think\cache\driver\File' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'File' . EXT, ], ]; diff --git a/mode/sae.php b/mode/sae.php index c17d12c8..4a944a6a 100644 --- a/mode/sae.php +++ b/mode/sae.php @@ -70,52 +70,55 @@ return [ // 别名定义 'alias' => [ - 'think\App' => CORE_PATH . 'App' . EXT, - 'think\Build' => CORE_PATH . 'Build' . EXT, - 'think\Cache' => CORE_PATH . 'Cache' . EXT, - 'think\Config' => CORE_PATH . 'Config' . EXT, - 'think\Console' => CORE_PATH . 'Console' . EXT, - 'think\Controller' => CORE_PATH . 'Controller' . EXT, - 'think\Cookie' => CORE_PATH . 'Cookie' . EXT, - 'think\Db' => CORE_PATH . 'Db' . EXT, - 'think\Debug' => CORE_PATH . 'Debug' . EXT, - 'think\Error' => CORE_PATH . 'Error' . EXT, - 'think\Exception' => CORE_PATH . 'Exception' . EXT, - 'think\exception\DbException' => CORE_PATH . 'exception' . DS . 'DbException' . EXT, - 'think\exception\PDOException' => CORE_PATH . 'exception' . DS . 'PDOException' . EXT, - 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, - 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, - 'think\exception\NotFoundException' => CORE_PATH . 'exception' . DS . 'NotFoundException' . EXT, - 'think\File' => CORE_PATH . 'File' . EXT, - 'think\Hook' => CORE_PATH . 'Hook' . EXT, - 'think\Input' => CORE_PATH . 'Input' . EXT, - 'think\Lang' => CORE_PATH . 'Lang' . EXT, - 'think\Log' => CORE_PATH . 'Log' . EXT, - 'think\Model' => CORE_PATH . 'Model' . EXT, - 'think\model\Relation' => CORE_PATH . 'model' . DS . 'Relation' . EXT, - 'think\model\Merge' => CORE_PATH . 'model' . DS . 'Merge' . EXT, - 'think\model\Pivot' => CORE_PATH . 'model' . DS . 'Pivot' . EXT, - 'think\Process' => CORE_PATH . 'Process' . EXT, - 'think\Response' => CORE_PATH . 'Response' . EXT, - 'think\Route' => CORE_PATH . 'Route' . EXT, - 'think\Session' => CORE_PATH . 'Session' . EXT, - 'think\Template' => CORE_PATH . 'Template' . EXT, - 'think\Url' => CORE_PATH . 'Url' . EXT, - 'think\Validate' => CORE_PATH . 'Validate' . EXT, - 'think\View' => CORE_PATH . 'View' . EXT, - 'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT, - 'think\db\connector\Mysql' => CORE_PATH . 'db' . DS . 'connector' . DS . 'Mysql' . EXT, - 'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT, - 'think\db\Builder\Mysql' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Mysql' . EXT, - 'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT, - 'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . EXT, - 'think\view\driver\Php' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Php' . EXT, - 'think\template\driver\File' => CORE_PATH . 'template' . DS . 'driver' . DS . 'File' . EXT, - 'think\log\driver\File' => CORE_PATH . 'log' . DS . 'driver' . DS . 'File' . EXT, - 'think\cache\driver\File' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'File' . EXT, - 'think\log\driver\Sae' => CORE_PATH . 'log' . DS . 'driver' . DS . 'Sae' . EXT, - 'think\cache\driver\Sae' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'Sae' . EXT, - 'think\template\driver\Sae' => CORE_PATH . 'template' . DS . 'driver' . DS . 'Sae' . EXT, + 'think\App' => CORE_PATH . 'App' . EXT, + 'think\Build' => CORE_PATH . 'Build' . EXT, + 'think\Cache' => CORE_PATH . 'Cache' . EXT, + 'think\Config' => CORE_PATH . 'Config' . EXT, + 'think\Console' => CORE_PATH . 'Console' . EXT, + 'think\Controller' => CORE_PATH . 'Controller' . EXT, + 'think\Cookie' => CORE_PATH . 'Cookie' . EXT, + 'think\Db' => CORE_PATH . 'Db' . EXT, + 'think\Debug' => CORE_PATH . 'Debug' . EXT, + 'think\Error' => CORE_PATH . 'Error' . EXT, + 'think\Exception' => CORE_PATH . 'Exception' . EXT, + 'think\exception\DbException' => CORE_PATH . 'exception' . DS . 'DbException' . EXT, + 'think\exception\Handle' => CORE_PATH . 'exception' . DS . 'Handle' . EXT, + 'think\exception\HttpException' => CORE_PATH . 'exception' . DS . 'HttpException' . EXT, + 'think\exception\HttpResponseException' => CORE_PATH . 'exception' . DS . 'HttpResponseException' . EXT, + 'think\exception\PDOException' => CORE_PATH . 'exception' . DS . 'PDOException' . EXT, + 'think\exception\ErrorException' => CORE_PATH . 'exception' . DS . 'ErrorException' . EXT, + 'think\exception\DbBindParamException' => CORE_PATH . 'exception' . DS . 'DbBindParamException' . EXT, + 'think\exception\ThrowableError' => CORE_PATH . 'exception' . DS . 'ThrowableError' . EXT, + 'think\File' => CORE_PATH . 'File' . EXT, + 'think\Hook' => CORE_PATH . 'Hook' . EXT, + 'think\Input' => CORE_PATH . 'Input' . EXT, + 'think\Lang' => CORE_PATH . 'Lang' . EXT, + 'think\Log' => CORE_PATH . 'Log' . EXT, + 'think\Model' => CORE_PATH . 'Model' . EXT, + 'think\model\Relation' => CORE_PATH . 'model' . DS . 'Relation' . EXT, + 'think\model\Merge' => CORE_PATH . 'model' . DS . 'Merge' . EXT, + 'think\model\Pivot' => CORE_PATH . 'model' . DS . 'Pivot' . EXT, + 'think\Process' => CORE_PATH . 'Process' . EXT, + 'think\Response' => CORE_PATH . 'Response' . EXT, + 'think\Route' => CORE_PATH . 'Route' . EXT, + 'think\Session' => CORE_PATH . 'Session' . EXT, + 'think\Template' => CORE_PATH . 'Template' . EXT, + 'think\Url' => CORE_PATH . 'Url' . EXT, + 'think\Validate' => CORE_PATH . 'Validate' . EXT, + 'think\View' => CORE_PATH . 'View' . EXT, + 'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT, + 'think\db\connector\Mysql' => CORE_PATH . 'db' . DS . 'connector' . DS . 'Mysql' . EXT, + 'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT, + 'think\db\Builder\Mysql' => CORE_PATH . 'db' . DS . 'builder' . DS . 'Mysql' . EXT, + 'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT, + 'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . EXT, + 'think\view\driver\Php' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Php' . EXT, + 'think\template\driver\File' => CORE_PATH . 'template' . DS . 'driver' . DS . 'File' . EXT, + 'think\log\driver\File' => CORE_PATH . 'log' . DS . 'driver' . DS . 'File' . EXT, + 'think\cache\driver\File' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'File' . EXT, + 'think\log\driver\Sae' => CORE_PATH . 'log' . DS . 'driver' . DS . 'Sae' . EXT, + 'think\cache\driver\Sae' => CORE_PATH . 'cache' . DS . 'driver' . DS . 'Sae' . EXT, + 'think\template\driver\Sae' => CORE_PATH . 'template' . DS . 'driver' . DS . 'Sae' . EXT, ], ];