From 962037321a166a67ebce16d75e31e90f2d13f3ba Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Tue, 31 May 2011 21:28:37 +0200 Subject: [PATCH] Make ZADD and ZREM variadic commands for Redis 2.4. --- lib/Predis/Commands/ZSetAdd.php | 6 ++++++ lib/Predis/Commands/ZSetRemove.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/lib/Predis/Commands/ZSetAdd.php b/lib/Predis/Commands/ZSetAdd.php index 1c68c535..bb0cf258 100644 --- a/lib/Predis/Commands/ZSetAdd.php +++ b/lib/Predis/Commands/ZSetAdd.php @@ -2,11 +2,17 @@ namespace Predis\Commands; +use Predis\Helpers; + class ZSetAdd extends Command { public function getId() { return 'ZADD'; } + protected function filterArguments(Array $arguments) { + return Helpers::filterVariadicValues($arguments); + } + public function parseResponse($data) { return (bool) $data; } diff --git a/lib/Predis/Commands/ZSetRemove.php b/lib/Predis/Commands/ZSetRemove.php index c549567c..238d9de3 100644 --- a/lib/Predis/Commands/ZSetRemove.php +++ b/lib/Predis/Commands/ZSetRemove.php @@ -2,11 +2,17 @@ namespace Predis\Commands; +use Predis\Helpers; + class ZSetRemove extends Command { public function getId() { return 'ZREM'; } + protected function filterArguments(Array $arguments) { + return Helpers::filterVariadicValues($arguments); + } + public function parseResponse($data) { return (bool) $data; }