You are here

public static function Redis_Client::setClient in Redis 7.2

Same name and namespace in other branches
  1. 7 lib/Redis/Client.php \Redis_Client::setClient()

Set client proxy.

File

lib/Redis/Client.php, line 95

Class

Redis_Client
Common code and client singleton, for all Redis clients.

Code

public static function setClient(Redis_Client_Interface $interface) {
  if (isset(self::$_client)) {
    throw new Exception("Once Redis client is connected, you cannot change client proxy instance.");
  }
  self::$_clientInterface = $interface;
}