From 2bdfed5071910e9dd317c9910ef7c6fdf9bb8db3 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Tue, 3 May 2011 15:14:51 +0200 Subject: [PATCH] Add an abstraction for a virtual command that leverages Redis scripting with the new EVAL command. --- lib/Predis/Commands/ScriptedCommand.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/Predis/Commands/ScriptedCommand.php diff --git a/lib/Predis/Commands/ScriptedCommand.php b/lib/Predis/Commands/ScriptedCommand.php new file mode 100644 index 00000000..bb366e18 --- /dev/null +++ b/lib/Predis/Commands/ScriptedCommand.php @@ -0,0 +1,16 @@ +keysCount()) === -1) { + $keys = count($arguments); + } + return array_merge(array($this->getScript(), $keys), $arguments); + } +}