mirror of
https://github.com/predis/predis.git
synced 2026-08-30 04:02:22 +00:00
Add an helper method to get the actual keys from the whole argument list.
This commit is contained in:
@@ -13,4 +13,12 @@ abstract class ScriptedCommand extends ServerEval {
|
||||
}
|
||||
return array_merge(array($this->getScript(), $keys), $arguments);
|
||||
}
|
||||
|
||||
protected function getKeys() {
|
||||
$arguments = $this->getArguments();
|
||||
if (($keys = $this->keysCount()) === -1) {
|
||||
return array_slice($arguments, 2);
|
||||
}
|
||||
return array_slice($arguments, 2, $keys);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user