mirror of
https://github.com/predis/predis.git
synced 2026-08-25 17:29:40 +00:00
21 lines
502 B
PHP
21 lines
502 B
PHP
<?php
|
|
|
|
namespace Predis\Commands;
|
|
|
|
class PrefixHelpers {
|
|
public static function multipleKeys(Array $arguments, $prefix) {
|
|
foreach ($arguments as &$key) {
|
|
$key = "$prefix$key";
|
|
}
|
|
return $arguments;
|
|
}
|
|
|
|
public static function skipLastArgument(Array $arguments, $prefix) {
|
|
$length = count($arguments);
|
|
for ($i = 0; $i < $length - 1; $i++) {
|
|
$arguments[$i] = "$prefix{$arguments[$i]}";
|
|
}
|
|
return $arguments;
|
|
}
|
|
}
|