@@ -392,6 +392,28 @@ public function psubscribe( $patterns, $callback ) {}
392
392
*/
393
393
public function publish ( $ channel , $ message ) {}
394
394
395
+ /**
396
+ * A command allowing you to get information on the Redis pub/sub system.
397
+ * @param string $keyword String, which can be: "channels", "numsub", or "numpat"
398
+ * @param string|array $argument Optional, variant.
399
+ * For the "channels" subcommand, you can pass a string pattern.
400
+ * For "numsub" an array of channel names
401
+ * @return array|int Either an integer or an array.
402
+ * - channels Returns an array where the members are the matching channels.
403
+ * - numsub Returns a key/value array where the keys are channel names and
404
+ * values are their counts.
405
+ * - numpat Integer return containing the number active pattern subscriptions.
406
+ * @link http://redis.io/commands/pubsub
407
+ * @example
408
+ * <pre>
409
+ * $redis->pubsub('channels'); // All channels
410
+ * $redis->pubsub('channels', '*pattern*'); // Just channels matching your pattern
411
+ * $redis->pubsub('numsub', array('chan1', 'chan2')); // Get subscriber counts for 'chan1' and 'chan2'
412
+ * $redis->pubsub('numpat'); // Get the number of pattern subscribers
413
+ * </pre>
414
+ */
415
+ public function pubsub ( $ keyword , $ argument ) {}
416
+
395
417
/**
396
418
* Verify if the specified key exists.
397
419
*
0 commit comments