PSR规范调整

This commit is contained in:
thinkphp
2015-10-04 13:05:15 +08:00
parent 1cfb3704c6
commit 27e724bb3c
135 changed files with 9426 additions and 11556 deletions

View File

@@ -8,43 +8,43 @@
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
/**
* ThinkPHP 普通模式定义
*/
return [
// 配置文件
'config' => THINK_PATH.'convention'.EXT,
'config' => THINK_PATH . 'convention' . EXT,
// 别名定义
'alias' => [
'think\App' => CORE_PATH . 'app'.EXT,
'think\Log' => CORE_PATH . 'log'.EXT,
'think\log\driver\File' => CORE_PATH . 'log/driver/file'.EXT,
'think\Config' => CORE_PATH . 'config'.EXT,
'think\Route' => CORE_PATH . 'route'.EXT,
'think\Exception' => CORE_PATH . 'exception'.EXT,
'think\Model' => CORE_PATH . 'model'.EXT,
'think\Db' => CORE_PATH . 'db'.EXT,
'think\Db\Driver' => CORE_PATH . 'db/driver'.EXT,
'think\Template' => CORE_PATH . 'template'.EXT,
'think\view\driver\Think' => CORE_PATH . 'view\driver\think'.EXT,
'think\template\driver\File' => CORE_PATH . 'template\driver\file'.EXT,
'think\Error' => CORE_PATH . 'error'.EXT,
'think\Cache' => CORE_PATH . 'cache'.EXT,
'think\cache\driver\File' => CORE_PATH . 'cache/driver/file'.EXT,
'think\Hook' => CORE_PATH . 'hook'.EXT,
'think\Session' => CORE_PATH . 'session'.EXT,
'think\Cookie' => CORE_PATH . 'cookie'.EXT,
'think\Controller' => CORE_PATH . 'controller'.EXT,
'think\View' => CORE_PATH . 'view'.EXT,
'think\Url' => CORE_PATH . 'url'.EXT,
'think\Debug' => CORE_PATH . 'debug'.EXT,
'think\Input' => CORE_PATH . 'input'.EXT,
'think\Parser' => CORE_PATH . 'parser'.EXT,
'think\Lang' => CORE_PATH . 'lang'.EXT,
'alias' => [
'think\App' => CORE_PATH . 'app' . EXT,
'think\Log' => CORE_PATH . 'log' . EXT,
'think\log\driver\File' => CORE_PATH . 'log/driver/file' . EXT,
'think\Config' => CORE_PATH . 'config' . EXT,
'think\Route' => CORE_PATH . 'route' . EXT,
'think\Exception' => CORE_PATH . 'exception' . EXT,
'think\Model' => CORE_PATH . 'model' . EXT,
'think\Db' => CORE_PATH . 'db' . EXT,
'think\Db\Driver' => CORE_PATH . 'db/driver' . EXT,
'think\Template' => CORE_PATH . 'template' . EXT,
'think\view\driver\Think' => CORE_PATH . 'view\driver\think' . EXT,
'think\template\driver\File' => CORE_PATH . 'template\driver\file' . EXT,
'think\Error' => CORE_PATH . 'error' . EXT,
'think\Cache' => CORE_PATH . 'cache' . EXT,
'think\cache\driver\File' => CORE_PATH . 'cache/driver/file' . EXT,
'think\Hook' => CORE_PATH . 'hook' . EXT,
'think\Session' => CORE_PATH . 'session' . EXT,
'think\Cookie' => CORE_PATH . 'cookie' . EXT,
'think\Controller' => CORE_PATH . 'controller' . EXT,
'think\View' => CORE_PATH . 'view' . EXT,
'think\Url' => CORE_PATH . 'url' . EXT,
'think\Debug' => CORE_PATH . 'debug' . EXT,
'think\Input' => CORE_PATH . 'input' . EXT,
'think\Parser' => CORE_PATH . 'parser' . EXT,
'think\Lang' => CORE_PATH . 'lang' . EXT,
],
'init' => [],
'init' => [],
];

View File

@@ -8,64 +8,64 @@
// +----------------------------------------------------------------------
// | Author: luofei614 <weibo.com/luofei614>
// +----------------------------------------------------------------------
/**
* ThinkPHP SAE应用模式定义文件
*/
$st = new SaeStorage();
$st = new SaeStorage();
return [
// 配置文件
'config' => [
'config' => [
/* 数据库设置 */
'database' => [
'database' => [
// 数据库类型
'type' => 'mysql',
'dsn' => '', //
'type' => 'mysql',
'dsn' => '', //
// 服务器地址
'hostname' => SAE_MYSQL_HOST_M.','.SAE_MYSQL_HOST_S,
'hostname' => SAE_MYSQL_HOST_M . ',' . SAE_MYSQL_HOST_S,
// 数据库名
'database' => SAE_MYSQL_DB,
'database' => SAE_MYSQL_DB,
// 用户名
'username' => SAE_MYSQL_USER,
'username' => SAE_MYSQL_USER,
// 密码
'password' => SAE_MYSQL_PASS,
// 端口
'hostport' => SAE_MYSQL_PORT,
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8',
// 数据库表前缀
'prefix' => '',
'password' => SAE_MYSQL_PASS,
// 端口
'hostport' => SAE_MYSQL_PORT,
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8',
// 数据库表前缀
'prefix' => '',
// 数据库调试模式
'debug' => false,
'debug' => false,
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 1,
'deploy' => 1,
// 数据库读写是否分离 主从式有效
'rw_separate' => true,
'rw_separate' => true,
// 读写分离后 主服务器数量
'master_num' => 1,
'master_num' => 1,
// 指定从服务器序号
'slave_no' => '',
],
'log_type' => 'Sae',
'data_cache_type' => 'Memcachesae',
'check_app_dir' => false,
'file_upload_type' => 'Sae',
'slave_no' => '',
],
'log_type' => 'Sae',
'data_cache_type' => 'Memcachesae',
'check_app_dir' => false,
'file_upload_type' => 'Sae',
],
// 别名定义
'alias' => [
'think\Log' => CORE_PATH . 'log'.EXT,
'think\log\driver\File' => CORE_PATH . 'log/driver/file'.EXT,
'think\log\driver\Sae' => CORE_PATH . 'log/driver/sae'.EXT,
'think\Exception' => CORE_PATH . 'exception'.EXT,
'think\Model' => CORE_PATH . 'model'.EXT,
'think\Db' => CORE_PATH . 'db'.EXT,
'think\Template' => CORE_PATH . 'template'.EXT,
'think\Cache' => CORE_PATH . 'cache'.EXT,
'think\cache\driver\File' => CORE_PATH . 'cache/driver/file'.EXT,
'think\cache\driver\Memcache' => CORE_PATH . 'cache/driver/memcache'.EXT,
'alias' => [
'think\Log' => CORE_PATH . 'log' . EXT,
'think\log\driver\File' => CORE_PATH . 'log/driver/file' . EXT,
'think\log\driver\Sae' => CORE_PATH . 'log/driver/sae' . EXT,
'think\Exception' => CORE_PATH . 'exception' . EXT,
'think\Model' => CORE_PATH . 'model' . EXT,
'think\Db' => CORE_PATH . 'db' . EXT,
'think\Template' => CORE_PATH . 'template' . EXT,
'think\Cache' => CORE_PATH . 'cache' . EXT,
'think\cache\driver\File' => CORE_PATH . 'cache/driver/file' . EXT,
'think\cache\driver\Memcache' => CORE_PATH . 'cache/driver/memcache' . EXT,
],
];