Add support for mixed case commands

Commands in Redis are most time written in uppercase, Predis supports
only lowercase commands. This change converts all commands into lower-
case, so MiXeDcAsE and UPPERCASE commands can be created as well.
This commit is contained in:
Jurian Sluiman
2011-09-28 17:47:56 +02:00
parent 0d28395aa0
commit c33d053531
+2
View File
@@ -70,10 +70,12 @@ abstract class ServerProfile implements IServerProfile, IProcessingSupport {
}
public function supportsCommand($command) {
$command = strtolower($command);
return isset($this->_registeredCommands[$command]);
}
public function createCommand($method, $arguments = array()) {
$method = strtolower($method);
if (!isset($this->_registeredCommands[$method])) {
throw new ClientException("'$method' is not a registered Redis command");
}