/** * Set backend connection * * @param \Redis $connection PhpRedis connection * * @return RedisOptions Fluent interface */ public function setConnection(\Redis $connection) { $this->connection = $connection; $this->options['auth'] = $connection->getAuth(); $this->options['host'] = $connection->getHost(); $this->options['port'] = $connection->getPort(); $this->options['dbNum'] = $connection->getDBNum(); return $this; }