废弃think/session/Driver.php

This commit is contained in:
huangdijia
2016-01-26 08:46:33 +08:00
parent 26d970a203
commit 20bdfe4046
3 changed files with 14 additions and 30 deletions

View File

@@ -1,25 +0,0 @@
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
namespace think\session;
use SessionHandler;
class Driver extends SessionHandler
{
protected $config = [];
public function __construct($config = [])
{
$this->config = array_merge($this->config, $config);
}
}

View File

@@ -11,10 +11,9 @@
namespace think\session\driver; namespace think\session\driver;
use think\Config; use SessionHandler;
use think\session\Driver;
class Memcache extends Driver class Memcache extends SessionHandler
{ {
protected $handler = null; protected $handler = null;
protected $config = [ protected $config = [
@@ -26,6 +25,11 @@ class Memcache extends Driver
'session_name' => '', // memcache key前缀 'session_name' => '', // memcache key前缀
]; ];
public function __construct($config = [])
{
$this->config = array_merge($this->config, $config);
}
/** /**
* 打开Session * 打开Session
* @access public * @access public

View File

@@ -12,9 +12,9 @@
namespace think\session\driver; namespace think\session\driver;
use think\Config; use think\Config;
use think\session\Driver; use SessionHandler;
class Redis extends Driver class Redis extends SessionHandler
{ {
protected $handler = null; protected $handler = null;
protected $config = [ protected $config = [
@@ -27,6 +27,11 @@ class Redis extends Driver
'session_name' => '', // memcache key前缀 'session_name' => '', // memcache key前缀
]; ];
public function __construct($config = [])
{
$this->config = array_merge($this->config, $config);
}
/** /**
* 打开Session * 打开Session
* @access public * @access public