HashGetMultiple.php 510 B

123456789101112131415161718192021
  1. <?php
  2. namespace Predis\Commands;
  3. class HashGetMultiple extends Command {
  4. public function getId() {
  5. return 'HMGET';
  6. }
  7. public function filterArguments(Array $arguments) {
  8. if (count($arguments) === 2 && is_array($arguments[1])) {
  9. $flattenedKVs = array($arguments[0]);
  10. $args = $arguments[1];
  11. foreach ($args as $v) {
  12. $flattenedKVs[] = $v;
  13. }
  14. return $flattenedKVs;
  15. }
  16. return $arguments;
  17. }
  18. }