|
@@ -74,7 +74,7 @@ class Common
|
|
|
$this->moduleInit($request);
|
|
|
}
|
|
|
|
|
|
- static public function getRedis()
|
|
|
+ static public function getRedis($params)
|
|
|
{
|
|
|
$options = [
|
|
|
'host' => '127.0.0.1',
|
|
@@ -87,6 +87,13 @@ class Common
|
|
|
'prefix' => '',
|
|
|
];
|
|
|
|
|
|
+ if (!extension_loaded('redis')) {
|
|
|
+ throw new \BadFunctionCallException('not support: redis');
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!empty($params)) {
|
|
|
+ $options = array_merge($options, $params);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|