diff options
author | michael-grunder <michael.grunder@gmail.com> | 2016-08-04 22:40:02 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2016-08-04 22:40:02 +0300 |
commit | 97b259a0456ebad100fdd34408ba0fd40ff775bc (patch) | |
tree | 06a411b2072450ca42802466a1eaa9966ca0528b /README.markdown | |
parent | 806b62a30dddd093ddd3546659d17dd3dc05c319 (diff) |
Fix documentation typo
Document raw command
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/README.markdown b/README.markdown index 1dfbef65..12602fd8 100644 --- a/README.markdown +++ b/README.markdown @@ -23,6 +23,7 @@ You can send comments, patches, questions [here on github](https://github.com/ph * [Lists](#lists) * [Sets](#sets) * [Sorted sets](#sorted-sets) + * [Geocoding](#geocoding) * [Pub/sub](#pubsub) * [Transactions](#transactions) * [Scripting](#scripting) @@ -2998,7 +2999,37 @@ _**Description**_: A command allowing you to get information on the Redis pub/su $redis->pubSub("channels"); /*All channels */ $redis->pubSub("channels", "*pattern*"); /* Just channels matching your pattern */ $redis->pubSub("numsub", Array("chan1", "chan2")); /*Get subscriber counts for 'chan1' and 'chan2'*/ -$redsi->pubSub("numpat"); /* Get the number of pattern subscribers */ +$redis->pubSub("numpat"); /* Get the number of pattern subscribers */ +``` + +~~~ + +## Generic +1. [rawCommand](#rawcommand) - Execute any generic command against the server. + +### rawCommand +----- +_**Description**_: A method to execute any arbitrary command against the a Redis server + +##### *Parameters* +This method is variadic and takes a dynamic number of arguments of various types (string, long, double), but must be passed at least one argument (the command keyword itself). + +##### *Return value* +The return value can be various types depending on what the server itself returns. No post processing is done to the returned value and must be handled by the client code. + +##### *Example* +```php +/* Returns: true */ +$redis->rawCommand("set", "foo", "bar"); + +/* Returns: "bar" */ +$redis->rawCommand("get", "foo"); + +/* Returns: 3 */ +$redis->rawCommand("rpush", "mylist", "one", 2, 3.5)); + +/* Returns: ["one", "2", "3.5000000000000000"] */ +$redis->rawCommand("lrange", "mylist", 0, -1); ``` ## Transactions |