内核更新升级

This commit is contained in:
2016-06-27 17:49:19 +08:00
parent f9c34a87f1
commit 56fd9ee760
19 changed files with 563 additions and 584 deletions

View File

@@ -16,6 +16,7 @@ use think\Exception;
class Redis extends SessionHandler
{
/** @var \Redis */
protected $handler = null;
protected $config = [
'host' => '127.0.0.1', // redis主机
@@ -35,8 +36,10 @@ class Redis extends SessionHandler
/**
* 打开Session
* @access public
* @param string $savePath
* @param mixed $sessName
* @param string $savePath
* @param mixed $sessName
* @return bool
* @throws Exception
*/
public function open($savePath, $sessName)
{
@@ -72,6 +75,7 @@ class Redis extends SessionHandler
* 读取Session
* @access public
* @param string $sessID
* @return bool|string
*/
public function read($sessID)
{
@@ -83,6 +87,7 @@ class Redis extends SessionHandler
* @access public
* @param string $sessID
* @param String $sessData
* @return bool
*/
public function write($sessID, $sessData)
{
@@ -97,16 +102,18 @@ class Redis extends SessionHandler
* 删除Session
* @access public
* @param string $sessID
* @return bool|void
*/
public function destroy($sessID)
{
return $this->handler->delete($this->config['session_name'] . $sessID) ? true : false;
$this->handler->delete($this->config['session_name'] . $sessID);
}
/**
* Session 垃圾回收
* @access public
* @param string $sessMaxLifeTime
* @return bool
*/
public function gc($sessMaxLifeTime)
{