@@ -566,35 +566,76 @@ public function sismember(string $key, mixed $value): Redis|bool;
566566 public function slaveof (string $ host = null , int $ port = 6379 ): bool ;
567567
568568 /**
569- Interact with Redis' slowlog functionality in variousu ways, depending
570- on the value of 'operations'.
571-
572- @param string $operation The operation you wish to perform. This can
573- be one of the following values:
574- 'get' - Retreive the Redis slowlog as an array.
575- 'len' - Retreive the length of the slowlog.
576- 'reset' - Remove all slowlog entries.
577- <code>
578- <?php
579- $redis->slowllog('get', -1); // Retreive all slowlog entries.
580- $redis->slowlog('len'); // Retreive slowlog length.
581- $redis->slowlog('reset'); // Reset the slowlog.
582- ?>
583- </code>
584-
585- @param int $length This optional argument can be passed when operation
586- is 'get' and will specify how many elements to retreive.
587- If omitted Redis will send up to a default number of
588- entries, which is configurable.
589-
590- Note: With Redis >= 7.0.0 you can send -1 to mean "all".
591-
592- @return mixed
569+ * Interact with Redis' slowlog functionality in variousu ways, depending
570+ * on the value of 'operations'.
571+ *
572+ * @see https://https://redis.io/commands/slowlog/
573+ * @category administration
574+ *
575+ * @param string $operation The operation you wish to perform. This can
576+ * be one of the following values:
577+ * 'get' - Retreive the Redis slowlog as an array.
578+ * 'len' - Retreive the length of the slowlog.
579+ * 'reset' - Remove all slowlog entries.
580+ * <code>
581+ * <?php
582+ * $redis->slowllog('get', -1); // Retreive all slowlog entries.
583+ * $redis->slowlog('len'); // Retreive slowlog length.
584+ * $redis->slowlog('reset'); // Reset the slowlog.
585+ * ?>
586+ * </code>
587+ *
588+ * @param int $length This optional argument can be passed when operation
589+ * is 'get' and will specify how many elements to retreive.
590+ * If omitted Redis will send up to a default number of
591+ * entries, which is configurable.
592+ *
593+ * Note: With Redis >= 7.0.0 you can send -1 to mean "all".
594+ *
595+ * @return mixed
593596 */
594597 public function slowlog (string $ operation , int $ length = 0 ): mixed ;
595598
599+ /**
600+ * Sort the contents of a Redis key in various ways.
601+ *
602+ * @see https://https://redis.io/commands/sort/
603+ *
604+ * @param string $key The key you wish to sort
605+ * @param array $options Various options controlling how you would like the
606+ * data sorted. See blow for a detailed description
607+ * of this options array.
608+ *
609+ * @return mixed This command can either return an array with the sorted data
610+ * or the number of elements placed in a destination set when
611+ * using the STORE option.
612+ *
613+ * <code>
614+ * <?php
615+ * $options = [
616+ * 'SORT' => 'ASC'|| 'DESC' // Sort in descending or descending order.
617+ * 'ALPHA' => true || false // Whether to sort alphanumerically.
618+ * 'LIMIT' => [0, 10] // Return a subset of the data at offset, count
619+ * 'BY' => 'weight_*' // For each element in the key, read data from the
620+ * external key weight_* and sort based on that value.
621+ * 'GET' => 'weight_*' // For each element in the source key, retreive the
622+ * data from key weight_* and return that in the result
623+ * rather than the source keys' element. This can
624+ * be used in combination with 'BY'
625+ * ];
626+ * ?>
627+ * </code>
628+ *
629+ */
596630 public function sort (string $ key , ?array $ options = null ): mixed ;
597631
632+ /**
633+ * This is simply a read-only variant of the sort command
634+ *
635+ * @see Redis::sort()
636+ */
637+ public function sort_ro (string $ key , ?array $ options = null ): mixed ;
638+
598639 /**
599640 * @deprecated
600641 */
0 commit comments