mirror of
https://github.com/predis/predis.git
synced 2026-08-23 21:29:38 +00:00
23 lines
604 B
PHP
23 lines
604 B
PHP
<?php
|
|
|
|
namespace Predis\Commands;
|
|
|
|
use Predis\Command;
|
|
|
|
class SetMultiple extends Command {
|
|
public function canBeHashed() { return false; }
|
|
public function getCommandId() { return 'MSET'; }
|
|
public function filterArguments(Array $arguments) {
|
|
if (count($arguments) === 1 && is_array($arguments[0])) {
|
|
$flattenedKVs = array();
|
|
$args = $arguments[0];
|
|
foreach ($args as $k => $v) {
|
|
$flattenedKVs[] = $k;
|
|
$flattenedKVs[] = $v;
|
|
}
|
|
return $flattenedKVs;
|
|
}
|
|
return $arguments;
|
|
}
|
|
}
|