Handle key prefixing in a more consistent way, and make it a first-class citizen in Predis.

This commit is contained in:
Daniele Alessandri
2011-05-04 17:18:38 +02:00
parent b5ebf48318
commit 5a80876c64
46 changed files with 225 additions and 156 deletions
@@ -20,6 +20,14 @@ class StringSetMultiple extends Command {
return $arguments;
}
protected function onPrefixKeys(Array $arguments, $prefix) {
$length = count($arguments);
for ($i = 0; $i < $length; $i += 2) {
$arguments[$i] = "$prefix{$arguments[$i]}";
}
return $arguments;
}
protected function canBeHashed() {
$args = $this->getArguments();
$keys = array();