public static function Redis_Client::setClient in Redis 7
Same name and namespace in other branches
- 7.2 lib/Redis/Client.php \Redis_Client::setClient()
Set client proxy.
2 calls to Redis_Client::setClient()
- phpredis.cache.inc in ./
phpredis.cache.inc - Placeholder file for using the PhpRedis cache backend. This file will also ensure the client handling API is fully loaded for lock backend.
- predis.cache.inc in ./
predis.cache.inc - Placeholder file for using the Predis cache backend. This file will also ensure the client handling API is fully loaded for lock backend.
File
- lib/
Redis/ Client.php, line 45
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;
}