@@ -431,42 +431,54 @@ public function decrBy( $key, $value ) {}
431
431
public function getMultiple ( array $ keys ) {}
432
432
433
433
/**
434
- * Adds the string value to the head (left) of the list. Creates the list if the key didn't exist.
434
+ * Adds the string values to the head (left) of the list. Creates the list if the key didn't exist.
435
435
* If the key exists and is not a list, FALSE is returned.
436
436
*
437
437
* @param string $key
438
- * @param string $value String, value to push in key
438
+ * @param string $value1 String, value to push in key
439
+ * @param string $value2 Optional
440
+ * @param string $valueN Optional
439
441
* @return int The new length of the list in case of success, FALSE in case of Failure.
440
442
* @link http://redis.io/commands/lpush
441
443
* @example
442
444
* <pre>
443
- * $redis->delete('key1');
444
- * $redis->lPush('key1', 'C'); // returns 1
445
- * $redis->lPush('key1', 'B'); // returns 2
446
- * $redis->lPush('key1', 'A'); // returns 3
447
- * // key1 now points to the following list: [ 'A', 'B', 'C' ]
445
+ * $redis->lPush('l', 'v1', 'v2', 'v3', 'v4') // int(4)
446
+ * var_dump( $redis->lRange('l', 0, -1) );
447
+ * //// Output:
448
+ * // array(4) {
449
+ * // [0]=> string(2) "v4"
450
+ * // [1]=> string(2) "v3"
451
+ * // [2]=> string(2) "v2"
452
+ * // [3]=> string(2) "v1"
453
+ * // }
448
454
* </pre>
449
455
*/
450
- public function lPush ( $ key , $ value ) {}
456
+ public function lPush ( $ key , $ value1 , $ value2 = null , $ valueN = null ) {}
451
457
452
458
/**
453
- * Adds the string value to the tail (right) of the list. Creates the list if the key didn't exist.
459
+ * Adds the string values to the tail (right) of the list. Creates the list if the key didn't exist.
454
460
* If the key exists and is not a list, FALSE is returned.
455
461
*
456
462
* @param string $key
457
- * @param string $value String, value to push in key
463
+ * @param string $value1 String, value to push in key
464
+ * @param string $value2 Optional
465
+ * @param string $valueN Optional
458
466
* @return int The new length of the list in case of success, FALSE in case of Failure.
459
467
* @link http://redis.io/commands/rpush
460
468
* @example
461
469
* <pre>
462
- * $redis->delete('key1');
463
- * $redis->rPush('key1', 'A'); // returns 1
464
- * $redis->rPush('key1', 'B'); // returns 2
465
- * $redis->rPush('key1', 'C'); // returns 3
466
- * // key1 now points to the following list: [ 'A', 'B', 'C' ]
470
+ * $redis->rPush('l', 'v1', 'v2', 'v3', 'v4'); // int(4)
471
+ * var_dump( $redis->lRange('l', 0, -1) );
472
+ * //// Output:
473
+ * // array(4) {
474
+ * // [0]=> string(2) "v1"
475
+ * // [1]=> string(2) "v2"
476
+ * // [2]=> string(2) "v3"
477
+ * // [3]=> string(2) "v4"
478
+ * // }
467
479
* </pre>
468
480
*/
469
- public function rPush ( $ key , $ value ) {}
481
+ public function rPush ( $ key , $ value1 , $ value2 = null , $ valueN = null ) {}
470
482
471
483
/**
472
484
* Adds the string value to the head (left) of the list if the list exists.
@@ -829,46 +841,54 @@ public function lInsert( $key, $position, $pivot, $value ) {}
829
841
830
842
831
843
/**
832
- * Adds a value to the set value stored at key. If this value is already in the set, FALSE is returned.
844
+ * Adds a values to the set value stored at key. If this value is already in the set, FALSE is returned.
833
845
*
834
- * @param string $key
835
- * @param string $value
836
- * @return bool TRUE if value didn't exist and was added successfully, FALSE if the value is already present.
846
+ * @param string $key Required key
847
+ * @param string $value1 Required value
848
+ * @param string $value2 Optional value
849
+ * @param string $valueN Optional value
850
+ * @return int Number of value added
837
851
* @link http://redis.io/commands/sadd
838
852
* @example
839
853
* <pre>
840
- * $redis->sAdd('key1' , 'set1'); // TRUE, 'key1' => {'set1'}
841
- * $redis->sAdd('key1' , 'set2'); // TRUE, 'key1' => {'set1', 'set2'}
842
- * $redis->sAdd('key1' , 'set2'); // FALSE, 'key1' => {'set1', 'set2'}
854
+ * $redis->sAdd('k', 'v1'); // int(1)
855
+ * $redis->sAdd('k', 'v1', 'v2', 'v3'); // int(2)
843
856
* </pre>
844
857
*/
845
- public function sAdd ( $ key , $ value ) {}
858
+ public function sAdd ( $ key , $ value1 , $ value2 = null , $ valueN = null ) {}
846
859
847
860
848
861
/**
849
- * Removes the specified member from the set value stored at key.
862
+ * Removes the specified members from the set value stored at key.
850
863
*
851
864
* @param string $key
852
- * @param string $member
853
- * @return bool TRUE if the member was present in the set, FALSE if it didn't.
865
+ * @param string $member1
866
+ * @param string $member2
867
+ * @param string $memberN
868
+ * @return int Number of deleted values
854
869
* @link http://redis.io/commands/srem
855
870
* @example
856
871
* <pre>
857
- * $redis->sAdd('key1' , 'set1');
858
- * $redis->sAdd('key1' , 'set2');
859
- * $redis->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
860
- * $redis->sRem('key1', 'set2'); // 'key1' => {'set1', 'set3'}
872
+ * var_dump( $redis->sAdd('k', 'v1', 'v2', 'v3') ); // int(3)
873
+ * var_dump( $redis->sRem('k', 'v2', 'v3') ); // int(2)
874
+ * var_dump( $redis->sMembers('k') );
875
+ * //// Output:
876
+ * // array(1) {
877
+ * // [0]=> string(2) "v1"
878
+ * // }
861
879
* </pre>
862
880
*/
863
- public function sRem ( $ key , $ member ) {}
881
+ public function sRem ( $ key , $ member1 , $ member2 = null , $ memberN = null ) {}
864
882
865
883
/**
866
884
* @see sRem()
867
885
* @link http://redis.io/commands/srem
868
886
* @param string $key
869
- * @param int $member
887
+ * @param string $member1
888
+ * @param string $member2
889
+ * @param string $memberN
870
890
*/
871
- public function sRemove ( $ key , $ member ) {}
891
+ public function sRemove ( $ key , $ member1 , $ member2 = null , $ memberN = null ) {}
872
892
873
893
874
894
/**
@@ -1874,20 +1894,30 @@ public function brpoplpush( $srcKey, $dstKey, $timeout ) {}
1874
1894
/**
1875
1895
* Adds the specified member with a given score to the sorted set stored at key.
1876
1896
*
1877
- * @param string $key
1878
- * @param float $score
1879
- * @param string $value
1880
- * @return int 1 if the element is added. 0 otherwise.
1897
+ * @param string $key Required key
1898
+ * @param float $score1 Required score
1899
+ * @param string $value1 Required value
1900
+ * @param float $score2 Optional score
1901
+ * @param string $value2 Optional value
1902
+ * @param float $scoreN Optional score
1903
+ * @param string $valueN Optional value
1904
+ * @return int Number of values added
1881
1905
* @link http://redis.io/commands/zadd
1882
1906
* @example
1883
1907
* <pre>
1884
- * $redis->zAdd('key', 1, 'val1');
1885
- * $redis->zAdd('key', 0, 'val0');
1886
- * $redis->zAdd('key', 5, 'val5');
1887
- * $redis->zRange('key', 0, -1); // array(val0, val1, val5)
1908
+ * <pre>
1909
+ * $redis->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' ); // int(2)
1910
+ * $redis->zRem('z', 'v2', 'v3'); // int(2)
1911
+ * var_dump( $redis->zRange('z', 0, -1) );
1912
+ * //// Output:
1913
+ * // array(2) {
1914
+ * // [0]=> string(2) "v1"
1915
+ * // [1]=> string(2) "v4"
1916
+ * // }
1917
+ * </pre>
1888
1918
* </pre>
1889
1919
*/
1890
- public function zAdd ( $ key , $ score , $ value ) {}
1920
+ public function zAdd ( $ key , $ score1 , $ value1 , $ score2 = null , $ value2 = null , $ scoreN = null , $ valueN = null ) {}
1891
1921
1892
1922
/**
1893
1923
* Returns a range of elements from the ordered set stored at the specified key,
@@ -1913,33 +1943,40 @@ public function zAdd( $key, $score, $value ) {}
1913
1943
* $redis->zRange('key1', 0, -1, true); // array('val0' => 0, 'val2' => 2, 'val10' => 10)
1914
1944
* </pre>
1915
1945
*/
1916
- public function zRange ( $ key , $ start , $ end , $ withscores = false ) {}
1946
+ public function zRange ( $ key , $ start , $ end , $ withscores = null ) {}
1917
1947
1918
1948
/**
1919
1949
* Deletes a specified member from the ordered set.
1920
1950
*
1921
1951
* @param string $key
1922
- * @param string $member
1923
- * @return int 1 on success, 0 on failure.
1952
+ * @param string $member1
1953
+ * @param string $member2
1954
+ * @param string $memberN
1955
+ * @return int Number of deleted values
1924
1956
* @link http://redis.io/commands/zrem
1925
1957
* @example
1926
1958
* <pre>
1927
- * $redis->zAdd('key', 0, 'val0');
1928
- * $redis->zAdd('key', 2, 'val2');
1929
- * $redis->zAdd('key', 10, 'val10');
1930
- * $redis->zDelete('key', 'val2');
1931
- * $redis->zRange('key', 0, -1); // array('val0', 'val10')
1959
+ * $redis->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' ); // int(2)
1960
+ * $redis->zRem('z', 'v2', 'v3'); // int(2)
1961
+ * var_dump( $redis->zRange('z', 0, -1) );
1962
+ * //// Output:
1963
+ * // array(2) {
1964
+ * // [0]=> string(2) "v1"
1965
+ * // [1]=> string(2) "v4"
1966
+ * // }
1932
1967
* </pre>
1933
1968
*/
1934
- public function zRem ( $ key , $ member ) {}
1969
+ public function zRem ( $ key , $ member1 , $ member2 = null , $ memberN = null ) {}
1935
1970
1936
1971
/**
1937
1972
* @see zRem()
1938
- * @param string $key
1939
- * @param string $member
1973
+ * @param string $key
1974
+ * @param string $member1
1975
+ * @param string $member2
1976
+ * @param string $memberN
1940
1977
* @link http://redis.io/commands/zrem
1941
1978
*/
1942
- public function zDelete ( $ key , $ member ) {}
1979
+ public function zDelete ( $ key , $ member1 , $ member2 = null , $ memberN = null ) {}
1943
1980
1944
1981
/**
1945
1982
* Returns the elements of the sorted set stored at the specified key in the range [start, end]
@@ -1966,7 +2003,7 @@ public function zDelete( $key, $member ) {}
1966
2003
* $redis->zRevRange('key', 0, -1, true); // array('val10' => 10, 'val2' => 2, 'val0' => 0)
1967
2004
* </pre>
1968
2005
*/
1969
- public function zRevRange ( $ key , $ start , $ end , $ withscore = false ) {}
2006
+ public function zRevRange ( $ key , $ start , $ end , $ withscore = null ) {}
1970
2007
1971
2008
/**
1972
2009
* Returns the elements of the sorted set stored at the specified key which have scores in the
@@ -2200,7 +2237,7 @@ public function zIncrBy( $key, $value, $member ) {}
2200
2237
* $redis->zUnion('ko3', array('k1', 'k2'), array(5, 1)); // 4, 'ko1' => array('val0', 'val2', 'val3', 'val1')
2201
2238
* </pre>
2202
2239
*/
2203
- public function zUnion ( $ Output , $ ZSetKeys , array $ Weights = null , $ aggregateFunction = 'SUM ' ) {}
2240
+ public function zUnion ($ Output , $ ZSetKeys , array $ Weights = null , $ aggregateFunction = 'SUM ' ) {}
2204
2241
2205
2242
/**
2206
2243
* Creates an intersection of sorted sets given in second argument.
@@ -2243,7 +2280,7 @@ public function zUnion( $Output, $ZSetKeys, array $Weights = null, $aggregateFun
2243
2280
* $redis->zInter('ko4', array('k1', 'k2'), array(1, 5), 'max'); // 2, 'ko4' => array('val3', 'val1')
2244
2281
* </pre>
2245
2282
*/
2246
- public function zInter ( $ Output , $ ZSetKeys , array $ Weights = null , $ aggregateFunction = 'SUM ' ) {}
2283
+ public function zInter ($ Output , $ ZSetKeys , array $ Weights = null , $ aggregateFunction = 'SUM ' ) {}
2247
2284
2248
2285
/**
2249
2286
* Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned.
@@ -2313,15 +2350,36 @@ public function hGet($key, $hashKey) {}
2313
2350
public function hLen ( $ key ) {}
2314
2351
2315
2352
/**
2316
- * Removes a value from the hash stored at key.
2353
+ * Removes a values from the hash stored at key.
2317
2354
* If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
2318
2355
*
2319
2356
* @param string $key
2320
- * @param string $hashKey
2357
+ * @param string $hashKey1
2358
+ * @param string $hashKey2
2359
+ * @param string $hashKeyN
2360
+ * @return int Number of deleted fields
2321
2361
* @link http://redis.io/commands/hdel
2322
- * @return bool TRUE in case of success, FALSE in case of failure
2362
+ * @example
2363
+ * <pre>
2364
+ * $redis->hMSet('h',
2365
+ * array(
2366
+ * 'f1' => 'v1',
2367
+ * 'f2' => 'v2',
2368
+ * 'f3' => 'v3',
2369
+ * 'f4' => 'v4',
2370
+ * ));
2371
+ *
2372
+ * var_dump( $redis->hDel('h', 'f1') ); // int(1)
2373
+ * var_dump( $redis->hDel('h', 'f2', 'f3') ); // int(2)
2374
+ * s
2375
+ * var_dump( $redis->hGetAll('h') );
2376
+ * //// Output:
2377
+ * // array(1) {
2378
+ * // ["f4"]=> string(2) "v4"
2379
+ * // }
2380
+ * </pre>
2323
2381
*/
2324
- public function hDel ( $ key , $ hashKey ) {}
2382
+ public function hDel ( $ key , $ hashKey1 , $ hashKey2 = null , $ hashKeyN = null ) {}
2325
2383
2326
2384
/**
2327
2385
* Returns the keys in a hash, as an array of strings.
0 commit comments