class Redis_Client_Predis in Redis 7
Same name and namespace in other branches
- 7.3 lib/Redis/Client/Predis.php \Redis_Client_Predis
- 7.2 lib/Redis/Client/Predis.php \Redis_Client_Predis
Predis client specific implementation.
Hierarchy
- class \Redis_Client_Predis implements Redis_Client_Interface
Expanded class hierarchy of Redis_Client_Predis
2 string references to 'Redis_Client_Predis'
- 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.
- predis.lock.inc in ./
predis.lock.inc - Drupal core lock.inc implementation using Redis via Predis library.
File
- lib/
Redis/ Client/ Predis.php, line 36
View source
class Redis_Client_Predis implements Redis_Client_Interface {
public function getClient($host = NULL, $port = NULL, $base = NULL) {
$connectionInfo = array(
'host' => $host,
'port' => $port,
'database' => $base,
);
foreach ($connectionInfo as $key => $value) {
if (!isset($value)) {
unset($connectionInfo[$key]);
}
}
return new Predis\Client($connectionInfo);
}
public function getName() {
return 'Predis';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Redis_Client_Predis:: |
public | function |
Get the connected client instance. Overrides Redis_Client_Interface:: |
|
Redis_Client_Predis:: |
public | function |
Get underlaying library name used. Overrides Redis_Client_Interface:: |