Эх сурвалжийг харах

Removed Predis\Client::registerCommand and Predis\Client::registerCommands as they are rarely used. The methods of the same name available in RedisServerProfile (and its derivates) serve the same purpose, use them from now on.

Daniele Alessandri 15 жил өмнө
parent
commit
cd8604b489
2 өөрчлөгдсөн 1 нэмэгдсэн , 8 устгасан
  1. 1 1
      README.markdown
  2. 0 7
      lib/Predis.php

+ 1 - 1
README.markdown

@@ -81,7 +81,7 @@ client instance at runtime. Actually, it is easier done than said:
     }
 
     $redis = new Predis\Client();
-    $redis->registerCommand('BrandNewRedisCommand', 'newcmd');
+    $redis->getProfile()->registerCommand('BrandNewRedisCommand', 'newcmd');
     $redis->newcmd();
 
 

+ 0 - 7
lib/Predis.php

@@ -161,13 +161,6 @@ class Client {
         return $multiExecBlock !== null ? $multiExec->execute($multiExecBlock) : $multiExec;
     }
 
-    public function registerCommands(Array $commands) {
-        $this->_serverProfile->registerCommands($commands);
-    }
-
-    public function registerCommand($command, $aliases) {
-        $this->_serverProfile->registerCommand($command, $aliases);
-    }
 }
 
 /* ------------------------------------------------------------------------- */