From 13ed82e5ddfba89ce4e18e5738c66ee35a6f5682 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 29 Sep 2016 18:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=A9=B1=E5=8A=A8=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=A2=9E=E5=8A=A0handler=E6=96=B9=E6=B3=95=E7=94=A8?= =?UTF-8?q?=E4=BA=8E=E8=8E=B7=E5=8F=96=E6=93=8D=E4=BD=9C=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E7=9A=84=E5=8F=A5=E6=9F=84=EF=BC=88=E6=9F=90=E4=BA=9B=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=B1=BB=E5=9E=8B=E5=8F=AF=E8=83=BD=E4=B8=BAnull?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/cache/Driver.php | 12 ++++++++++++ library/think/cache/driver/Memcache.php | 1 - library/think/cache/driver/Memcached.php | 1 - library/think/cache/driver/Redis.php | 11 ----------- library/think/cache/driver/Sqlite.php | 1 - library/think/cache/driver/Wincache.php | 2 -- 6 files changed, 12 insertions(+), 16 deletions(-) diff --git a/library/think/cache/Driver.php b/library/think/cache/Driver.php index f77ac30b..e0aeb7bc 100644 --- a/library/think/cache/Driver.php +++ b/library/think/cache/Driver.php @@ -16,6 +16,7 @@ namespace think\cache; */ abstract class Driver { + protected $handler = null; protected $options = []; protected $tag; @@ -173,4 +174,15 @@ abstract class Driver return []; } } + + /** + * 返回句柄对象,可执行其它高级方法 + * + * @access public + * @return object + */ + public function handler() + { + return $this->handler; + } } diff --git a/library/think/cache/driver/Memcache.php b/library/think/cache/driver/Memcache.php index 8e3df294..bddf7157 100644 --- a/library/think/cache/driver/Memcache.php +++ b/library/think/cache/driver/Memcache.php @@ -16,7 +16,6 @@ use think\Exception; class Memcache extends Driver { - protected $handler = null; protected $options = [ 'host' => '127.0.0.1', 'port' => 11211, diff --git a/library/think/cache/driver/Memcached.php b/library/think/cache/driver/Memcached.php index 5857edce..4c4505b0 100644 --- a/library/think/cache/driver/Memcached.php +++ b/library/think/cache/driver/Memcached.php @@ -15,7 +15,6 @@ use think\cache\Driver; class Memcached extends Driver { - protected $handler; protected $options = [ 'host' => '127.0.0.1', 'port' => 11211, diff --git a/library/think/cache/driver/Redis.php b/library/think/cache/driver/Redis.php index 1f8686af..e7f78762 100644 --- a/library/think/cache/driver/Redis.php +++ b/library/think/cache/driver/Redis.php @@ -22,7 +22,6 @@ use think\cache\Driver; */ class Redis extends Driver { - protected $handler = null; protected $options = [ 'host' => '127.0.0.1', 'port' => 6379, @@ -174,14 +173,4 @@ class Redis extends Driver return $this->handler->flushDB(); } - /** - * 返回句柄对象,可执行其它高级方法 - * - * @access public - * @return object - */ - public function handler() - { - return $this->handler; - } } diff --git a/library/think/cache/driver/Sqlite.php b/library/think/cache/driver/Sqlite.php index 0b774a1a..6dbd41fe 100644 --- a/library/think/cache/driver/Sqlite.php +++ b/library/think/cache/driver/Sqlite.php @@ -20,7 +20,6 @@ use think\Exception; */ class Sqlite extends Driver { - protected $options = [ 'db' => ':memory:', 'table' => 'sharedmemory', diff --git a/library/think/cache/driver/Wincache.php b/library/think/cache/driver/Wincache.php index 36fe3bea..a9cc7d22 100644 --- a/library/think/cache/driver/Wincache.php +++ b/library/think/cache/driver/Wincache.php @@ -25,8 +25,6 @@ class Wincache extends Driver 'expire' => 0, ]; - protected $tag; - /** * 架构函数 * @param array $options 缓存参数