v6
Chaim 4 years ago
parent 3b10d58e36
commit acff9b201b

@ -21,9 +21,7 @@ namespace DtApp\ThinkLibrary\cache;
use DtApp\ThinkLibrary\exception\DtaException; use DtApp\ThinkLibrary\exception\DtaException;
use DtApp\ThinkLibrary\facade\Times; use DtApp\ThinkLibrary\facade\Times;
use think\db\exception\DbException;
use think\facade\Db; use think\facade\Db;
use think\Model;
/** /**
* 缓存数据库驱动 * 缓存数据库驱动
@ -60,7 +58,7 @@ class Mysql
/** /**
* 设置 * 设置
* @param $cache_value * @param $cache_value
* @return int|string * @return bool
* @throws DtaException * @throws DtaException
*/ */
public function set($cache_value) public function set($cache_value)
@ -77,7 +75,7 @@ class Mysql
/** /**
* 获取 * 获取
* @return array|Model|null * @return mixed
* @throws DtaException * @throws DtaException
*/ */
public function get() public function get()
@ -92,8 +90,9 @@ class Mysql
/** /**
* 删除 * 删除
* @return int * @return bool
* @throws DbException|DtaException * @throws DtaException
* @throws \think\db\exception\DbException
*/ */
public function delete() public function delete()
{ {
@ -107,8 +106,9 @@ class Mysql
/** /**
* 更新 * 更新
* @param $cache_value * @param $cache_value
* @return int * @return bool
* @throws DbException|DtaException * @throws DtaException
* @throws \think\db\exception\DbException
*/ */
public function update($cache_value) public function update($cache_value)
{ {
@ -125,9 +125,9 @@ class Mysql
/** /**
* 自增 * 自增
* @param int $int * @param int $int
* @return int * @return bool
* @throws DbException
* @throws DtaException * @throws DtaException
* @throws \think\db\exception\DbException
*/ */
public function inc(int $int = 1) public function inc(int $int = 1)
{ {
@ -143,9 +143,9 @@ class Mysql
/** /**
* 自减 * 自减
* @param int $int * @param int $int
* @return int * @return bool
* @throws DbException
* @throws DtaException * @throws DtaException
* @throws \think\db\exception\DbException
*/ */
public function dec(int $int = 1) public function dec(int $int = 1)
{ {

@ -22,7 +22,6 @@ declare (strict_types=1);
namespace DtApp\ThinkLibrary\helper; namespace DtApp\ThinkLibrary\helper;
use DtApp\ThinkLibrary\exception\DtaException; use DtApp\ThinkLibrary\exception\DtaException;
use think\Exception;
/** /**
* XML管理类 * XML管理类
@ -36,7 +35,6 @@ class Xmls
* @param array $values 数组 * @param array $values 数组
* @return string * @return string
* @throws DtaException * @throws DtaException
* @throws Exception
*/ */
public function toXml(array $values) public function toXml(array $values)
{ {

@ -21,11 +21,9 @@ namespace DtApp\ThinkLibrary\session;
use DtApp\ThinkLibrary\facade\Times; use DtApp\ThinkLibrary\facade\Times;
use think\contract\SessionHandlerInterface; use think\contract\SessionHandlerInterface;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\facade\Db; use think\facade\Db;
/** /**
* Session保存在MySQL驱动 * Session保存在MySQL驱动
* Class Mysql * Class Mysql
@ -67,7 +65,7 @@ class Mysql implements SessionHandlerInterface
* delete方法是在销毁会话的时候执行调用Session::destroy()方法)。 * delete方法是在销毁会话的时候执行调用Session::destroy()方法)。
* @param string $sessionId * @param string $sessionId
* @return bool * @return bool
* @throws DbException * @throws \think\db\exception\DbException
*/ */
public function delete(string $sessionId): bool public function delete(string $sessionId): bool
{ {
@ -82,9 +80,9 @@ class Mysql implements SessionHandlerInterface
* @param string $sessionId * @param string $sessionId
* @param string $data * @param string $data
* @return bool * @return bool
* @throws DataNotFoundException * @throws \think\db\exception\DataNotFoundException
* @throws DbException * @throws \think\db\exception\DbException
* @throws ModelNotFoundException * @throws \think\db\exception\ModelNotFoundException
*/ */
public function write(string $sessionId, string $data): bool public function write(string $sessionId, string $data): bool
{ {

Loading…
Cancel
Save