mirror of
https://github.com/predis/predis.git
synced 2026-09-14 20:37:29 +00:00
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:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user