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

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

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