You are here

public static function Redis_Client::getClass in Redis 7.2

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

Get specific class implementing the current client usage for the specific asked core subsystem.

Parameters

string $system: One of the Redis_Client::IMPL_* constant.

string $clientName: Client name, if fixed.

Return value

string Class name, if found.

Throws

Exception If not found.

7 calls to Redis_Client::getClass()
Redis_Cache::__construct in lib/Redis/Cache.php
Redis_Client::getClientInterface in lib/Redis/Client.php
Lazy instanciate client proxy depending on the actual configuration.
Redis_Lock::getBackend in lib/Redis/Lock.php
Get actual lock backend.
redis_path_backend_get in ./redis.path.inc
Get Redis path lookup backend.
Redis_Queue::__construct in lib/Redis/Queue.php
Default contructor

... See full list

File

lib/Redis/Client.php, line 184

Class

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

Code

public static function getClass($system, $clientName = NULL) {
  $className = $system . (isset($clientName) ? $clientName : self::getClientName());
  if (!class_exists($className)) {
    throw new Exception($className . " does not exists");
  }
  return $className;
}