Add an helper method to get the actual keys from the whole argument list.

This commit is contained in:
Daniele Alessandri
2011-05-03 17:37:39 +02:00
parent 2bdfed5071
commit a386263d84
+8
View File
@@ -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);
}
}