From aa0e0222b96f035d5589b4d973c255c2bad624d0 Mon Sep 17 00:00:00 2001 From: Shaverdova Elena Date: Mon, 5 Aug 2019 18:54:16 +0200 Subject: [PATCH] Add Redis.sAddArray method --- src/Redis.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/Redis.php b/src/Redis.php index b60dc8e..c04c9cc 100644 --- a/src/Redis.php +++ b/src/Redis.php @@ -4932,6 +4932,28 @@ public function xRevRange($stream, $end, $start, $count = null) public function xTrim($stream, $maxLen, $isApproximate) { } + + /** + * Adds a values to the set value stored at key. + * + * @param string $key Required key + * @param array $values Required values + * + * @return int|bool The number of elements added to the set. + * If this value is already in the set, FALSE is returned + * + * @link https://redis.io/commands/sadd + * @link https://github.com/phpredis/phpredis/commit/3491b188e0022f75b938738f7542603c7aae9077 + * @since phpredis 2.2.8 + * @example + *
+     * $redis->sAddArray('k', array('v1'));                // boolean
+     * $redis->sAddArray('k', array('v1', 'v2', 'v3'));    // boolean
+     * 
+ */ + public function sAddArray($key, array $values) + { + } } class RedisException extends Exception