Skip to content

Commit

Permalink
strategy关键词改为adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
cmpan committed Sep 11, 2017
1 parent f10fa0f commit a75002a
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea/
/vendor/
/.settings/
/.project
Expand Down
7 changes: 5 additions & 2 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule . index.php
</IfModule>

<Files ~ "\.htaccess">
Order Allow,Deny
Deny from all
</Files>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name" : "windwork/app-basic",
"description" : "Windwork, easy,quick,performance oop mvc web framework",
"version" : "0.1.0",
"version" : "0.2.0",
"require" : {
"php" : ">=5.5.0",
"ext-gd" : "*",
Expand Down
14 changes: 7 additions & 7 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
'srv' => [
// 模板组件设置
'template' => [
'class' => '\\wf\\template\\strategy\\Wind',
'class' => '\\wf\\template\\adapter\\Wind',
'compileForce' => 1, // 强制编译模板开关
'compileMerge' => 1, // 将编模板合并成一个文件
'compileCheck' => 1, // 检查编译模板开关
Expand All @@ -60,7 +60,7 @@

// 缓存组件设置
'cache' => [
'class' => '\\wf\\cache\\strategy\\File', // 缓存模式,File|Memcache|Memcached|Redis
'class' => '\\wf\\cache\\adapter\\File', // 缓存模式,File|Memcache|Memcached|Redis
'enabled' => 1, // 是否启用缓存
'dir' => dirname(__DIR__) . '/data/cache', // 缓存文件夹
'expire' => 7200, // 缓存更新周期(默认:7200s)
Expand Down Expand Up @@ -95,7 +95,7 @@
// 附件组件设置
'storage' => [
// 附件处理类
'class' => '\\wf\\storage\\strategy\\File',
'class' => '\\wf\\storage\\adapter\\File',

// 附件存贮文件夹,相对于站点根目录
'dir' => 'storage',
Expand All @@ -116,7 +116,7 @@

// 日志组件设置
'logger' => [
'class' => '\\wf\\logger\\strategy\\File',
'class' => '\\wf\\logger\\adapter\\File',
'dir' => dirname(__DIR__) . '/data/log', //

// 日志级别,可设置为0-7,记录小于或等于该级别的日志
Expand All @@ -133,17 +133,17 @@

// 加密解密组件设置
'crypt' => [
'class' => '\\wf\\crypt\\strategy\\AzDG',
'class' => '\\wf\\crypt\\adapter\\AzDG',
],

// 验证码组件设置
'captcha' => [
'class' => '\\wf\\captcha\\strategy\\GDSimple',
'class' => '\\wf\\captcha\\adapter\\GDSimple',
],

// 邮件发送组件设置
'mailer' => [
'class' => '\\wf\\mailer\\strategy\\SMTP',
'class' => '\\wf\\mailer\\adapter\\SMTP',
'port' => 25,
'host' => 'smtp.163.com',
'auth' => true,
Expand Down
4 changes: 2 additions & 2 deletions config/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return [
// 主数据库
'default' => [
'class' => '\\wf\\db\\strategy\\PDOMySQL', // MySQLi/PDOMySQL
'class' => '\\wf\\db\\adapter\\PDOMySQL', // MySQLi/PDOMySQL
'host' => '127.0.0.1', // 本机测试
'port' => '3306', // 数据库服务器端口
'name' => 'windworkdb', // 数据库名
Expand All @@ -21,7 +21,7 @@
/*
'slave' => array(
// 数据库设置
'class' => '\\wf\\db\\strategy\\PDOMySQL',
'class' => '\\wf\\db\\adapter\\PDOMySQL',
'host' => '127.0.0.1', // 本机测试
'port' => '3306', // 数据库服务器端口
'name' => 'windworkdb', // 数据库名
Expand Down
2 changes: 1 addition & 1 deletion config/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 链接相关设置
*/
return [
'class' => '\\wf\\route\\strategy\\Simple',
'class' => '\\wf\\route\\adapter\\Simple',
'useModule' => 0, // 是否启用模块

// 默认请求响应action
Expand Down

0 comments on commit a75002a

Please sign in to comment.