public function set_many(array $keyvaluearray) {
        $pairs = [];
        foreach ($keyvaluearray as $pair) {
            $pairs[$pair['key']] = $pair['value'];
        }
        if ($this->redis->hMSet($this->hash, $pairs)) {
            return count($pairs);
        }
        return 0;
    }
public function set_many(array $keyvaluearray) {
        $pairs = [];
        foreach ($keyvaluearray as $pair) {
            $pairs[$pair['key']] = $pair['value'];
        }
        if ($this->redis->hMSet($this->hash, $pairs)) {
            return count($pairs);
        }
        return 0;
    }
public function set_many ( array $ keyvaluearray ) { $ pairs = [ ] ; foreach ( $ keyvaluearray as $ pair ) { $ pairs [ $ pair [ 'key' ] ] = $ pair [ 'value' ] ; } if ( $ this -> redis -> hMSet ( $ this -> hash , $ pairs ) ) { return count ( $ pairs ) ; } return 0 ; }
Set the values of many keys.

@param array $keyvaluearray An array of key/value pairs. Each item in the array is an associative array
with two keys, 'key' and 'value'.
@return int The number of key/value pairs successfuly set.
Set the values of many keys .