|
|
@ -21,17 +21,19 @@ class SsdbClient |
|
|
//}
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function client($host=null,$port=null) |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @throws \Exception |
|
|
|
|
|
*/ |
|
|
|
|
|
public static function client($host=null, $port=null) |
|
|
{ |
|
|
{ |
|
|
$host = $host??env('SSDB_HOST'); |
|
|
$host = $host??env('SSDB_HOST'); |
|
|
$port = $port??env('SSDB_PORT'); |
|
|
$port = $port??env('SSDB_PORT'); |
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
|
try { |
|
|
$SSDB = new SimpleSSDB($host, $port); |
|
|
$SSDB = new SimpleSSDB($host, $port); |
|
|
$SSDB->auth(env('SSDB_AUTH')); |
|
|
$SSDB->auth(env('SSDB_AUTH')); |
|
|
}catch(\Exception $e){ |
|
|
|
|
|
dd($e); |
|
|
|
|
|
|
|
|
} catch (\Exception $e) { |
|
|
|
|
|
throw new \Exception('SSDB:' . $e->getMessage()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $SSDB; |
|
|
return $SSDB; |
|
|
|