mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
异常类规范 增加异常类 改进Query类的value和column的缓存冲突问题
This commit is contained in:
2
library/think/cache/driver/Apc.php
vendored
2
library/think/cache/driver/Apc.php
vendored
@@ -36,7 +36,7 @@ class Apc
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('apc_cache_info')) {
|
||||
throw new Exception('_NOT_SUPPERT_:Apc');
|
||||
throw new \BadFunctionCallException('not support Apc');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
4
library/think/cache/driver/Memcache.php
vendored
4
library/think/cache/driver/Memcache.php
vendored
@@ -30,12 +30,12 @@ class Memcache
|
||||
* 架构函数
|
||||
* @param array $options 缓存参数
|
||||
* @access public
|
||||
* @throws Exception
|
||||
* @throws \BadFunctionCallException
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('memcache')) {
|
||||
throw new Exception('_NOT_SUPPERT_:memcache');
|
||||
throw new \BadFunctionCallException('not support memcache');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Memcached.php
vendored
2
library/think/cache/driver/Memcached.php
vendored
@@ -33,7 +33,7 @@ class Memcached
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('memcached')) {
|
||||
throw new Exception('_NOT_SUPPERT_:memcached');
|
||||
throw new \BadFunctionCallException('not support memcached');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Redis.php
vendored
2
library/think/cache/driver/Redis.php
vendored
@@ -42,7 +42,7 @@ class Redis
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('redis')) {
|
||||
throw new Exception('_NOT_SUPPERT_:redis');
|
||||
throw new \BadFunctionCallException('not support redis');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Redisd.php
vendored
2
library/think/cache/driver/Redisd.php
vendored
@@ -83,7 +83,7 @@ class Redisd
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('redis')) {
|
||||
throw new Exception('_NOT_SUPPERT_:redis');
|
||||
throw new \BadFunctionCallException('not support redis');
|
||||
}
|
||||
|
||||
$this->options = $options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Sae.php
vendored
2
library/think/cache/driver/Sae.php
vendored
@@ -38,7 +38,7 @@ class Sae
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('memcache_init')) {
|
||||
throw new Exception('请在SAE平台上运行代码。');
|
||||
throw new \BadFunctionCallException('请在SAE平台上运行代码。');
|
||||
}
|
||||
$this->handler = memcache_init();
|
||||
if (!$this->handler) {
|
||||
|
||||
4
library/think/cache/driver/Sqlite.php
vendored
4
library/think/cache/driver/Sqlite.php
vendored
@@ -32,13 +32,13 @@ class Sqlite implements CacheInterface
|
||||
/**
|
||||
* 架构函数
|
||||
* @param array $options 缓存参数
|
||||
* @throws Exception
|
||||
* @throws \BadFunctionCallException
|
||||
* @access public
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('sqlite')) {
|
||||
throw new Exception('_NOT_SUPPERT_:sqlite');
|
||||
throw new \BadFunctionCallException('not support sqlite');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Wincache.php
vendored
2
library/think/cache/driver/Wincache.php
vendored
@@ -34,7 +34,7 @@ class Wincache
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('wincache_ucache_info')) {
|
||||
throw new Exception('_NOT_SUPPERT_:WinCache');
|
||||
throw new \BadFunctionCallException('not support WinCache');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
4
library/think/cache/driver/Xcache.php
vendored
4
library/think/cache/driver/Xcache.php
vendored
@@ -29,12 +29,12 @@ class Xcache
|
||||
* 架构函数
|
||||
* @param array $options 缓存参数
|
||||
* @access public
|
||||
* @throws Exception
|
||||
* @throws \BadFunctionCallException
|
||||
*/
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('xcache_info')) {
|
||||
throw new Exception('_NOT_SUPPERT_:Xcache');
|
||||
throw new \BadFunctionCallException('not support Xcache');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
Reference in New Issue
Block a user