unixSocket !== null) { $isConnected = $this->connect($this->unixSocket); } else { if(is_null($host)){ $host = $this->hostname; } if(is_null($port)){ $port = $this->port; } if(is_null($timeout)){ $timeout = $this->connectionTimeout; } $isConnected = $this->connect($host, $port, $timeout, $retry_interval); } if ($isConnected === false) { throw new RedisException('Connect to redis server error.'); } if ($this->password !== null) { $this->auth($this->password); } if ($this->database !== null) { $this->select($this->database); } } /** * @return bool */ public function ping() { return parent::ping() === '+PONG'; } /** * @param null $async * @return bool */ public function flushdb($async = NULL) { return parent::flushDB($async); } }