增加接口类 规范驱动扩展

This commit is contained in:
thinkphp
2016-05-05 07:39:05 +08:00
parent 3774e3451a
commit 7a8bb3b54f
33 changed files with 237 additions and 64 deletions

View File

@@ -24,23 +24,23 @@ use think\Cache;
* );
* @author liu21st <liu21st@gmail.com>
*/
class Db
class Db implements CacheInterface
{
protected $handler = null;
protected $options = [
'type' => '',
'dsn' => '',
'hostname' => '',
'hostport' => '',
'username' => '',
'password' => '',
'database' => '',
'charset' => '',
'table' => '',
'prefix' => '',
'expire' => 0,
'length' => 0,
'type' => '',
'dsn' => '',
'hostname' => '',
'hostport' => '',
'username' => '',
'password' => '',
'database' => '',
'charset' => '',
'table' => '',
'prefix' => '',
'expire' => 0,
'length' => 0,
];
/**
@@ -162,4 +162,4 @@ class Db
return $this->handler->execute('TRUNCATE TABLE `' . $this->options['table'] . '`');
}
}
}