模式定义文件修改

This commit is contained in:
thinkphp
2016-04-26 23:46:25 +08:00
parent a6a3d572e7
commit 63f4ed0f37
3 changed files with 22 additions and 8 deletions

View File

@@ -250,10 +250,10 @@ function session($name, $value = '', $prefix = null)
// 判断或获取
return 0 === strpos($name, '?') ? Session::has(substr($name, 1), $prefix) : Session::get($name, $prefix);
} elseif (is_null($value)) {
// 删除session
// 删除
return Session::delete($name, $prefix);
} else {
// 设置session
// 设置
return Session::set($name, $value, $prefix);
}
}
@@ -277,10 +277,10 @@ function cookie($name, $value = '', $option = null)
// 获取
return Cookie::get($name);
} elseif (is_null($value)) {
// 删除session
// 删除
return Cookie::delete($name);
} else {
// 设置session
// 设置
return Cookie::set($name, $value, $option);
}
}

View File

@@ -30,6 +30,7 @@ return [
'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,
@@ -40,14 +41,19 @@ return [
'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\Driver' => CORE_PATH . 'db' . DS . 'Driver' . EXT,
'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT,
'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT,
'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT,
'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . 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,

View File

@@ -74,6 +74,7 @@ return [
'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,
@@ -85,13 +86,20 @@ return [
'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\Driver' => CORE_PATH . 'db' . DS . 'Driver' . EXT,
'think\db\Connection' => CORE_PATH . 'db' . DS . 'Connection' . EXT,
'think\db\Builder' => CORE_PATH . 'db' . DS . 'Builder' . EXT,
'think\db\Query' => CORE_PATH . 'db' . DS . 'Query' . EXT,
'think\view\driver\Think' => CORE_PATH . 'view' . DS . 'driver' . DS . 'Think' . 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,