Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
ThinkLibrary
提交
acff9b20
T
ThinkLibrary
项目概览
数据应用
/
ThinkLibrary
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
T
ThinkLibrary
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
acff9b20
编写于
8月 08, 2020
作者:
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 优化
上级
3b10d58e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
21 deletion
+17
-21
src/cache/Mysql.php
src/cache/Mysql.php
+12
-12
src/helper/Xmls.php
src/helper/Xmls.php
+0
-2
src/session/Mysql.php
src/session/Mysql.php
+5
-7
未找到文件。
src/cache/Mysql.php
浏览文件 @
acff9b20
...
...
@@ -21,9 +21,7 @@ namespace DtApp\ThinkLibrary\cache;
use
DtApp\ThinkLibrary\exception\DtaException
;
use
DtApp\ThinkLibrary\facade\Times
;
use
think\db\exception\DbException
;
use
think\facade\Db
;
use
think\Model
;
/**
* 缓存数据库驱动
...
...
@@ -60,7 +58,7 @@ class Mysql
/**
* 设置
* @param $cache_value
* @return
int|string
* @return
bool
* @throws DtaException
*/
public
function
set
(
$cache_value
)
...
...
@@ -77,7 +75,7 @@ class Mysql
/**
* 获取
* @return
array|Model|null
* @return
mixed
* @throws DtaException
*/
public
function
get
()
...
...
@@ -92,8 +90,9 @@ class Mysql
/**
* 删除
* @return int
* @throws DbException|DtaException
* @return bool
* @throws DtaException
* @throws \think\db\exception\DbException
*/
public
function
delete
()
{
...
...
@@ -107,8 +106,9 @@ class Mysql
/**
* 更新
* @param $cache_value
* @return int
* @throws DbException|DtaException
* @return bool
* @throws DtaException
* @throws \think\db\exception\DbException
*/
public
function
update
(
$cache_value
)
{
...
...
@@ -125,9 +125,9 @@ class Mysql
/**
* 自增
* @param int $int
* @return int
* @throws DbException
* @return bool
* @throws DtaException
* @throws \think\db\exception\DbException
*/
public
function
inc
(
int
$int
=
1
)
{
...
...
@@ -143,9 +143,9 @@ class Mysql
/**
* 自减
* @param int $int
* @return int
* @throws DbException
* @return bool
* @throws DtaException
* @throws \think\db\exception\DbException
*/
public
function
dec
(
int
$int
=
1
)
{
...
...
src/helper/Xmls.php
浏览文件 @
acff9b20
...
...
@@ -22,7 +22,6 @@ declare (strict_types=1);
namespace
DtApp\ThinkLibrary\helper
;
use
DtApp\ThinkLibrary\exception\DtaException
;
use
think\Exception
;
/**
* XML管理类
...
...
@@ -36,7 +35,6 @@ class Xmls
* @param array $values 数组
* @return string
* @throws DtaException
* @throws Exception
*/
public
function
toXml
(
array
$values
)
{
...
...
src/session/Mysql.php
浏览文件 @
acff9b20
...
...
@@ -21,11 +21,9 @@ namespace DtApp\ThinkLibrary\session;
use
DtApp\ThinkLibrary\facade\Times
;
use
think\contract\SessionHandlerInterface
;
use
think\db\exception\DataNotFoundException
;
use
think\db\exception\DbException
;
use
think\db\exception\ModelNotFoundException
;
use
think\facade\Db
;
/**
* Session保存在MySQL驱动
* Class Mysql
...
...
@@ -67,7 +65,7 @@ class Mysql implements SessionHandlerInterface
* delete方法是在销毁会话的时候执行(调用Session::destroy()方法)。
* @param string $sessionId
* @return bool
* @throws DbException
* @throws
\think\db\exception\
DbException
*/
public
function
delete
(
string
$sessionId
):
bool
{
...
...
@@ -82,9 +80,9 @@ class Mysql implements SessionHandlerInterface
* @param string $sessionId
* @param string $data
* @return bool
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
* @throws
\think\db\exception\
DataNotFoundException
* @throws
\think\db\exception\
DbException
* @throws
\think\db\exception\
ModelNotFoundException
*/
public
function
write
(
string
$sessionId
,
string
$data
):
bool
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录