protected function _init() { try { if (null == $this->_conn) { $config = $this->_config['config']; $t = explode('/', $config['dsn']); $db = isset($t[1]) ? $t[1] : 0; $t = explode(':', $t[0]); $redis = new Connection(); $redis->connect($t[0], $t[1]); if (isset($config['auth'])) { $redis->auth($config['auth']); } $redis->select($db); $this->_conn = $redis; } } catch (\RedisException $re) { throw new Exception($re->getMessage(), $re->getCode(), $re); } }