From 6e76fbf660a181ea9a2e16d76e9fd5c8e355bcc9 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Fri, 18 Dec 2009 21:59:00 +0100 Subject: [PATCH] Moved the default server profile class name to a private static variable of the Client class. --- lib/Predis.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Predis.php b/lib/Predis.php index 5a8c6af9..2ddd4ffe 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -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