Predis\Command\Processor\KeyPrefixProcessor::skipFirst PHP Method

skipFirst() public static method

Applies the specified prefix to all the arguments but the first one.
public static skipFirst ( Predis\Command\CommandInterface $command, string $prefix )
$command Predis\Command\CommandInterface Command instance.
$prefix string Prefix string.
    public static function skipFirst(CommandInterface $command, $prefix)
    {
        if ($arguments = $command->getArguments()) {
            $length = count($arguments);
            for ($i = 1; $i < $length; ++$i) {
                $arguments[$i] = "{$prefix}{$arguments[$i]}";
            }
            $command->setRawArguments($arguments);
        }
    }