Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2013-04-28 22:10:32 +0400
committermichael-grunder <michael.grunder@gmail.com>2013-04-28 22:10:32 +0400
commitf9f2dc0dbf02394ef221b3b1ef8fc67a73b722de (patch)
tree2d53c95d37a9e7af92b7de0482906f4a4fd46e5d /README.markdown
parent4c16a303efdde3d3c41d8f6c44a24cec2d45ae22 (diff)
parent3e6d5b60d66e0a5b31080a7109c412b0ce6358e6 (diff)
Merge branch 'release/2.2.3'2.2.3
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown29
1 files changed, 28 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown
index bb403d2f..0f4d9cb4 100644
--- a/README.markdown
+++ b/README.markdown
@@ -2522,7 +2522,6 @@ $redis->zAdd('key', 2, 'val2');
$redis->zAdd('key', 10, 'val10');
$redis->zRangeByScore('key', 0, 3); /* array('val0', 'val2') */
$redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE); /* array('val0' => 0, 'val2' => 2) */
-$redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1)); /* array('val2' => 2) */
$redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1)); /* array('val2') */
$redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1)); /* array('val2' => 2) */
~~~
@@ -2889,6 +2888,34 @@ $redis->script('exists', $script1, [$script2, $script3, ...]);
* SCRIPT KILL will return true if a script was able to be killed and false if not
* SCRIPT EXISTS will return an array with TRUE or FALSE for each passed script
+### client
+-----
+_**Description**_: Issue the CLIENT command with various arguments.
+
+The Redis CLIENT command can be used in four ways.
+* CLIENT LIST
+* CLIENT GETNAME
+* CLIENT SETNAME [name]
+* CLIENT KILL [ip:port]
+
+##### *Usage*
+~~~
+$redis->client('list'); // Get a list of clients
+$redis->client('getname'); // Get the name of the current connection
+$redis->client('setname', 'somename'); // Set the name of the current connection
+$redis->client('kill', <ip:port>); // Kill the process at ip:port
+~~~
+
+##### *Return value*
+This will vary depending on which client command was executed.
+
+* CLIENT LIST will return an array of arrays with client information.
+* CLIENT GETNAME will return the client name or false if none has been set
+* CLIENT SETNAME will return true if it can be set and false if not
+* CLIENT KILL will return true if the client can be killed, and false if not
+
+Note: phpredis will attempt to reconnect so you can actually kill your own connection
+but may not notice losing it!
### getLastError
-----
_**Description**_: The last error message (if any)