mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
改进Handle类支持异常的多语言 Lang类增加has方法 增加核心中文语言包
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 \BadFunctionCallException('not support Apc');
|
||||
throw new \BadFunctionCallException('not support: Apc');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Memcache.php
vendored
2
library/think/cache/driver/Memcache.php
vendored
@@ -35,7 +35,7 @@ class Memcache
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('memcache')) {
|
||||
throw new \BadFunctionCallException('not support 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 \BadFunctionCallException('not support 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 \BadFunctionCallException('not support 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
@@ -84,7 +84,7 @@ class Redisd
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('redis')) {
|
||||
throw new \BadFunctionCallException('not support redis');
|
||||
throw new \BadFunctionCallException('not support: redis');
|
||||
}
|
||||
|
||||
$this->options = $options = array_merge($this->options, $options);
|
||||
|
||||
6
library/think/cache/driver/Sae.php
vendored
6
library/think/cache/driver/Sae.php
vendored
@@ -38,11 +38,11 @@ class Sae
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('memcache_init')) {
|
||||
throw new \BadFunctionCallException('请在SAE平台上运行代码。');
|
||||
throw new \BadFunctionCallException('must run at sae');
|
||||
}
|
||||
$this->handler = memcache_init();
|
||||
if (!$this->handler) {
|
||||
throw new Exception('您未开通Memcache服务,请在SAE管理平台初始化Memcache服务');
|
||||
throw new Exception('memcache init error');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
@@ -113,7 +113,7 @@ class Sae
|
||||
if (!$kv) {
|
||||
$kv = new \SaeKV();
|
||||
if (!$kv->init()) {
|
||||
throw new Exception('您没有初始化KVDB,请在SAE管理平台初始化KVDB服务');
|
||||
throw new Exception('KVDB init error');
|
||||
}
|
||||
}
|
||||
return $kv;
|
||||
|
||||
2
library/think/cache/driver/Sqlite.php
vendored
2
library/think/cache/driver/Sqlite.php
vendored
@@ -38,7 +38,7 @@ class Sqlite implements CacheInterface
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!extension_loaded('sqlite')) {
|
||||
throw new \BadFunctionCallException('not support 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 \BadFunctionCallException('not support WinCache');
|
||||
throw new \BadFunctionCallException('not support: WinCache');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
2
library/think/cache/driver/Xcache.php
vendored
2
library/think/cache/driver/Xcache.php
vendored
@@ -34,7 +34,7 @@ class Xcache
|
||||
public function __construct($options = [])
|
||||
{
|
||||
if (!function_exists('xcache_info')) {
|
||||
throw new \BadFunctionCallException('not support Xcache');
|
||||
throw new \BadFunctionCallException('not support: Xcache');
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$this->options = array_merge($this->options, $options);
|
||||
|
||||
Reference in New Issue
Block a user