缓存驱动统一增加handler方法用于获取操作对象的句柄(某些缓存类型可能为null)

This commit is contained in:
thinkphp
2016-09-29 18:01:22 +08:00
parent f98415ad45
commit 13ed82e5dd
6 changed files with 12 additions and 16 deletions

View File

@@ -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;
}
}