Predis\Command\Processor\KeyPrefixProcessor::interleaved PHP Метод

interleaved() публичный статический Метод

Applies the specified prefix only to even arguments in the list.
public static interleaved ( Predis\Command\CommandInterface $command, string $prefix )
$command Predis\Command\CommandInterface Command instance.
$prefix string Prefix string.
    public static function interleaved(CommandInterface $command, $prefix)
    {
        if ($arguments = $command->getArguments()) {
            $length = count($arguments);
            for ($i = 0; $i < $length; $i += 2) {
                $arguments[$i] = "{$prefix}{$arguments[$i]}";
            }
            $command->setRawArguments($arguments);
        }
    }