12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace Predis\Command;
- class StringSetMultiple extends AbstractCommand implements PrefixableCommandInterface
- {
-
- public function getId()
- {
- return 'MSET';
- }
-
- protected 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;
- }
-
- public function prefixKeys($prefix)
- {
- PrefixHelpers::interleaved($this, $prefix);
- }
- }
|