HashGetMultiple.php 525 B

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