8000 Fix documentation typo · jrtkcoder/phpredis@65c4de2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65c4de2

Browse files
Fix documentation typo
Document raw command
1 parent a06f423 commit 65c4de2

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

README.markdown

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,10 +2995,40 @@ _**Description**_: A command allowing you to get information on the Redis pub/su
29952995

29962996
##### *Example*
29972997
~~~
2998-
$redis->pubsub("channels"); /*All channels */
2999-
$redis->pubsub("channels", "*pattern*"); /* Just channels matching your pattern */
3000-
$redis->pubsub("numsub", Array("chan1", "chan2")); /*Get subscriber counts for 'chan1' and 'chan2'*/
3001-
$redsi->pubsub("numpat"); /* Get the number of pattern subscribers */
2998+
$redis->pubSub("channels"); /*All channels */
2999+
$redis->pubSub("channels", "*pattern*"); /* Just channels matching your pattern */
3000+
$redis->pubSub("numsub", Array("chan1", "chan2")); /*Get subscriber counts for 'chan1' and 'chan2'*/
3001+
$redis->pubSub("numpat"); /* Get the number of pattern subscribers */
3002+
```
3003+
3004+
~~~
3005+
3006+
## Generic
3007+
1. [rawCommand](#rawcommand) - Execute any generic command against the server.
3008+
3009+
### rawCommand
3010+
-----
3011+
_**Description**_: A method to execute any arbitrary command against the a Redis server
3012+
3013+
##### *Parameters*
3014+
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).
3015+
3016+
##### *Return value*
3017+
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.
3018+
3019+
##### *Example*
3020+
```php
3021+
/* Returns: true */
3022+
$redis->rawCommand("set", "foo", "bar");
3023+
3024+
/* Returns: "bar" */
3025+
$redis->rawCommand("get", "foo");
3026+
3027+
/* Returns: 3 */
3028+
$redis->rawCommand("rpush", "mylist", "one", 2, 3.5));
3029+
3030+
/* Returns: ["one", "2", "3.5000000000000000"] */
3031+
$redis->rawCommand("lrange", "mylist", 0, -1);
30023032
```
30033033

30043034
## Transactions

0 commit comments

Comments
 (0)
0