Skip to content

Commit f8c23de

Browse files
committed
Added support for RedisArray.
1 parent 6b909d2 commit f8c23de

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

redisphp.php

+33
Original file line numberDiff line numberDiff line change
@@ -2454,3 +2454,36 @@ public function hMGet($key, $hashKeys) {}
24542454
}
24552455

24562456
class RedisException extends Exception {}
2457+
2458+
class RedisArray {
2459+
/**
2460+
* Constructor
2461+
*
2462+
* @param string $name Name of the redis array to create (required if using redis.ini to define array)
2463+
* @param array $hosts Array of hosts to construct the array with
2464+
* @param array $opts Array of options
2465+
* @link https://github.com/nicolasff/phpredis/blob/master/arrays.markdown
2466+
*/
2467+
function __construct($name = '', array $hosts = NULL, array $opts = NULL) {}
2468+
2469+
/**
2470+
* @return array list of hosts for the selected array
2471+
*/
2472+
public function _hosts() {}
2473+
2474+
/**
2475+
* @return string the name of the function used to extract key parts during consistent hashing
2476+
*/
2477+
public function _function() {}
2478+
2479+
/**
2480+
* @param string key The key for which you want to lookup the host
2481+
* @return string the host to be used for a certain key
2482+
*/
2483+
public function _target($key) {}
2484+
2485+
/**
2486+
* Use this function when a new node is added and keys need to be rehashed.
2487+
*/
2488+
public function _rehash() {}
2489+
}

0 commit comments

Comments
 (0)