HashGetMultiple.php 497 B

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