mirror of
https://github.com/predis/predis.git
synced 2026-08-24 15:39:28 +00:00
Moved the default server profile class name to a private static variable of the Client class.
This commit is contained in:
+3
-2
@@ -12,11 +12,12 @@ class Client {
|
||||
// TODO: command arguments should be sanitized or checked for bad arguments
|
||||
// (e.g. CRLF in keys for inline commands)
|
||||
|
||||
private static $_defaultServerProfile = 'Predis\RedisServer__V1_2';
|
||||
private $_connection, $_serverProfile;
|
||||
|
||||
public function __construct($host = Connection::DEFAULT_HOST, $port = Connection::DEFAULT_PORT) {
|
||||
// TODO: for now the server compatibility profile is hardcoded.
|
||||
$this->_serverProfile = new RedisServer__V1_2();
|
||||
// TODO: the server profile should be provided upon initialization.
|
||||
$this->_serverProfile = new self::$_defaultServerProfile();
|
||||
$this->setConnection($this->createConnection(
|
||||
func_num_args() === 1 && is_array($host) || @stripos('redis://') === 0
|
||||
? $host
|
||||
|
||||
Reference in New Issue
Block a user