Sha256: 62656755eff5ba2d1184c49afdc0e33b0ee4e8c0b44c744f777b487f19901446

Contents?: true

Size: 557 Bytes

Versions: 7

Compression:

Stored size: 557 Bytes

Contents

<?php

namespace Predis\Commands;

class HashSetMultiple extends Command {
    public function getId() {
        return 'HMSET';
    }

    protected function filterArguments(Array $arguments) {
        if (count($arguments) === 2 && is_array($arguments[1])) {
            $flattenedKVs = array($arguments[0]);
            $args = $arguments[1];
            foreach ($args as $k => $v) {
                $flattenedKVs[] = $k;
                $flattenedKVs[] = $v;
            }
            return $flattenedKVs;
        }
        return $arguments;
    }
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
appstats-0.25.1 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.25.0 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.24.0 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.23.5 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.23.4 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.23.3 doc/benchmarks/Predis/Commands/HashSetMultiple.php
appstats-0.23.2 doc/benchmarks/Predis/Commands/HashSetMultiple.php