mirror of
https://github.com/predis/predis.git
synced 2026-09-12 19:37:05 +00:00
Add support for transparent key prefixing to EVAL and the Predis\Commands\ScriptedCommand class.
This commit is contained in:
@@ -7,6 +7,14 @@ class ServerEval extends Command {
|
||||
return 'EVAL';
|
||||
}
|
||||
|
||||
protected function onPrefixKeys(Array $arguments, $prefix) {
|
||||
$arguments = $this->getArguments();
|
||||
for ($i = 2; $i < $arguments[1] + 2; $i++) {
|
||||
$arguments[$i] = "$prefix{$arguments[$i]}";
|
||||
}
|
||||
return $arguments;
|
||||
}
|
||||
|
||||
protected function canBeHashed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user