Predis\Command\Processor\KeyPrefixProcessor::evalKeys PHP 메소드

evalKeys() 공개 정적인 메소드

Applies the specified prefix to the keys of an EVAL-based command.
public static evalKeys ( Predis\Command\CommandInterface $command, string $prefix )
$command Predis\Command\CommandInterface Command instance.
$prefix string Prefix string.
    public static function evalKeys(CommandInterface $command, $prefix)
    {
        if ($arguments = $command->getArguments()) {
            for ($i = 2; $i < $arguments[1] + 2; ++$i) {
                $arguments[$i] = "{$prefix}{$arguments[$i]}";
            }
            $command->setRawArguments($arguments);
        }
    }