@@ -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 , $ valueN ) {}
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 , $ valueN ) {}
470
482
471
483
/**
472
484
* Adds the string value to the head (left) of the list if the list exists.
@@ -821,46 +833,54 @@ public function lInsert($key, $position, $pivot, $value) {}
821
833
822
834
823
835
/**
824
- * Adds a value to the set value stored at key. If this value is already in the set, FALSE is returned.
836
+ * Adds a values to the set value stored at key. If this value is already in the set, FALSE is returned.
825
837
*
826
- * @param string $key
827
- * @param string $value
828
- * @return bool TRUE if value didn't exist and was added successfully, FALSE if the value is already present.
838
+ * @param string $key Required key
839
+ * @param string $value1 Required value
840
+ * @param string $value2 Optional value
841
+ * @param string $valueN Optional value
842
+ * @return int Number of value added
829
843
* @link http://redis.io/commands/sadd
830
844
* @example
831
845
* <pre>
832
- * $redis->sAdd('key1' , 'set1'); // TRUE, 'key1' => {'set1'}
833
- * $redis->sAdd('key1' , 'set2'); // TRUE, 'key1' => {'set1', 'set2'}
834
- * $redis->sAdd('key1' , 'set2'); // FALSE, 'key1' => {'set1', 'set2'}
846
+ * $redis->sAdd('k', 'v1'); // int(1)
847
+ * $redis->sAdd('k', 'v1', 'v2', 'v3'); // int(2)
835
848
* </pre>
836
849
*/
837
- public function sAdd ($ key , $ value ) {}
850
+ public function sAdd ( $ key , $ value1 , $ value2 , $ valueN ) {}
838
851
839
852
840
853
/**
841
- * Removes the specified member from the set value stored at key.
854
+ * Removes the specified members from the set value stored at key.
842
855
*
843
856
* @param string $key
844
- * @param string $member
845
- * @return bool TRUE if the member was present in the set, FALSE if it didn't.
857
+ * @param string $member1
858
+ * @param string $member2
859
+ * @param string $memberN
860
+ * @return int Number of deleted values
846
861
* @link http://redis.io/commands/srem
847
862
* @example
848
863
* <pre>
849
- * $redis->sAdd('key1' , 'set1');
850
- * $redis->sAdd('key1' , 'set2');
851
- * $redis->sAdd('key1' , 'set3'); // 'key1' => {'set1', 'set2', 'set3'}
852
- * $redis->sRem('key1', 'set2'); // 'key1' => {'set1', 'set3'}
864
+ * var_dump( $redis->sAdd('k', 'v1', 'v2', 'v3') ); // int(3)
865
+ * var_dump( $redis->sRem('k', 'v2', 'v3') ); // int(2)
866
+ * var_dump( $redis->sMembers('k') );
867
+ * //// Output:
868
+ * // array(1) {
869
+ * // [0]=> string(2) "v1"
870
+ * // }
853
871
* </pre>
854
872
*/
855
- public function sRem ($ key , $ member ) {}
873
+ public function sRem ($ key , $ member1 , $ member2 , $ memberN ) {}
856
874
857
875
/**
858
876
* @see sRem()
859
877
* @link http://redis.io/commands/srem
860
878
* @param string $key
861
- * @param int $member
879
+ * @param string $member1
880
+ * @param string $member2
881
+ * @param string $memberN
862
882
*/
863
- public function sRemove ($ key , $ member ) {}
883
+ public function sRemove ($ key , $ member1 , $ member2 , $ memberN ) {}
864
884
865
885
866
886
/**
@@ -1837,20 +1857,30 @@ public function brpoplpush($srcKey, $dstKey, $timeout) {}
1837
1857
/**
1838
1858
* Adds the specified member with a given score to the sorted set stored at key.
1839
1859
*
1840
- * @param string $key
1841
- * @param float $score
1842
- * @param string $value
1843
- * @return int 1 if the element is added. 0 otherwise.
1860
+ * @param string $key Required key
1861
+ * @param float $score1 Required score
1862
+ * @param string $value1 Required value
1863
+ * @param float $score2 Optional score
1864
+ * @param string $value2 Optional value
1865
+ * @param float $scoreN Optional score
1866
+ * @param string $valueN Optional value
1867
+ * @return int Number of values added
1844
1868
* @link http://redis.io/commands/zadd
1845
1869
* @example
1846
1870
* <pre>
1847
- * $redis->zAdd('key', 1, 'val1');
1848
- * $redis->zAdd('key', 0, 'val0');
1849
- * $redis->zAdd('key', 5, 'val5');
1850
- * $redis->zRange('key', 0, -1); // array(val0, val1, val5)
1871
+ * <pre>
1872
+ * $redis->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' ); // int(2)
1873
+ * $redis->zRem('z', 'v2', 'v3'); // int(2)
1874
+ * var_dump( $redis->zRange('z', 0, -1) );
1875
+ * //// Output:
1876
+ * // array(2) {
1877
+ * // [0]=> string(2) "v1"
1878
+ * // [1]=> string(2) "v4"
1879
+ * // }
1880
+ * </pre>
1851
1881
* </pre>
1852
1882
*/
1853
- public function zAdd ($ key , $ score , $ value ) {}
1883
+ public function zAdd ($ key , $ score1 , $ value1 , $ score2 , $ value2 , $ scoreN , $ valueN ) {}
1854
1884
1855
1885
/**
1856
1886
* Returns a range of elements from the ordered set stored at the specified key,
@@ -1882,30 +1912,34 @@ public function zRange($key, $start, $end, $withscores = false) {}
1882
1912
* Deletes a specified member from the ordered set.
1883
1913
*
1884
1914
* @param string $key
1885
- * @param string $member
1886
- * @return int 1 on success, 0 on failure.
1915
+ * @param string $member1
1916
+ * @param string $member2
1917
+ * @param string $memberN
1918
+ * @return int Number of deleted values
1887
1919
* @link http://redis.io/commands/zrem
1888
1920
* @example
1889
1921
* <pre>
1890
- * $redis->zAdd('key', 0, 'val0');
1891
- * $redis->zAdd('key', 2, 'val2');
1892
- * $redis->zAdd('key', 10, 'val10');
1893
- * $redis->zDelete('key', 'val2');
1894
- * $redis->zRange('key', 0, -1); // array('val0', 'val10')
1922
+ * $redis->zAdd('z', 1, 'v2', 2, 'v2', 3, 'v3', 4, 'v4' ); // int(2)
1923
+ * $redis->zRem('z', 'v2', 'v3'); // int(2)
1924
+ * var_dump( $redis->zRange('z', 0, -1) );
1925
+ * //// Output:
1926
+ * // array(2) {
1927
+ * // [0]=> string(2) "v1"
1928
+ * // [1]=> string(2) "v4"
1929
+ * // }
1895
1930
* </pre>
1896
1931
*/
1897
- public function zRem ($ key , $ member ) {}
1932
+ public function zRem ($ key , $ member1 , $ member2 , $ memberN ) {}
1898
1933
1899
1934
/**
1900
1935
* @see zRem()
1901
- * @param string $key
1902
- * @param string $member
1936
+ * @param string $key
1937
+ * @param string $member1
1938
+ * @param string $member2
1939
+ * @param string $memberN
1903
1940
* @link http://redis.io/commands/zrem
1904
1941
*/
1905
- public function zDelete ($ key , $ member ) {}
1906
-
1907
-
1908
-
1942
+ public function zDelete ($ key , $ member1 , $ member2 , $ memberN ) {}
1909
1943
1910
1944
/**
1911
1945
* Returns the elements of the sorted set stored at the specified key in the range [start, end]
@@ -2279,15 +2313,36 @@ public function hGet($key, $hash) {}
2279
2313
public function hLen ($ key ) {}
2280
2314
2281
2315
/**
2282
- * Removes a value from the hash stored at key.
2316
+ * Removes a values from the hash stored at key.
2283
2317
* If the hash table doesn't exist, or the key doesn't exist, FALSE is returned.
2284
2318
*
2285
2319
* @param string $key
2286
- * @param string $hashKey
2320
+ * @param string $hashKey1
2321
+ * @param string $hashKey2
2322
+ * @param string $hashKeyN
2323
+ * @return int Number of deleted fields
2287
2324
* @link http://redis.io/commands/hdel
2288
- * @return bool TRUE in case of success, FALSE in case of failure
2325
+ * @example
2326
+ * <pre>
2327
+ * $redis->hMSet('h',
2328
+ * array(
2329
+ * 'f1' => 'v1',
2330
+ * 'f2' => 'v2',
2331
+ * 'f3' => 'v3',
2332
+ * 'f4' => 'v4',
2333
+ * ));
2334
+ *
2335
+ * var_dump( $redis->hDel('h', 'f1') ); // int(1)
2336
+ * var_dump( $redis->hDel('h', 'f2', 'f3') ); // int(2)
2337
+ * s
2338
+ * var_dump( $redis->hGetAll('h') );
2339
+ * //// Output:
2340
+ * // array(1) {
2341
+ * // ["f4"]=> string(2) "v4"
2342
+ * // }
2343
+ * </pre>
2289
2344
*/
2290
- public function hDel ($ key , $ hashKey ) {}
2345
+ public function hDel ($ key , $ hashKey1 , $ hashKey2 , $ hashKeyN ) {}
2291
2346
2292
2347
/**
2293
2348
* Returns the keys in a hash, as an array of strings.
0 commit comments