src/Command/Processor/KeyPrefixProcessor.php
public static function sort(CommandInterface $command, $prefix)
    {
        if ($arguments = $command->getArguments()) {
            $arguments[0] = "$prefix{$arguments[0]}";

            if (($count = count($arguments)) > 1) {
                for ($i = 1; $i < $count; ++$i) {
                    switch (strtoupper($arguments[$i])) {
                        case 'BY':
                        case 'STORE':
                            $arguments[$i] = "$prefix{$arguments[++$i]}";
                            break;

                        case 'GET':
                            $value = $arguments[++$i];
                            if ($value !== '#') {
                                $arguments[$i] = "$prefix$value";
                            }
                            break;

                        case 'LIMIT';
                            $i += 2;
                            break;
                    }
                }
            }

            $command->setRawArguments($arguments);
        }
    }
public static function sort(CommandInterface $command, $prefix)
    {
        if ($arguments = $command->getArguments()) {
            $arguments[0] = "$prefix{$arguments[0]}";

            if (($count = count($arguments)) > 1) {
                for ($i = 1; $i < $count; ++$i) {
                    switch (strtoupper($arguments[$i])) {
                        case 'BY':
                        case 'STORE':
                            $arguments[$i] = "$prefix{$arguments[++$i]}";
                            break;

                        case 'GET':
                            $value = $arguments[++$i];
                            if ($value !== '#') {
                                $arguments[$i] = "$prefix$value";
                            }
                            break;

                        case 'LIMIT';
                            $i += 2;
                            break;
                    }
                }
            }

            $command->setRawArguments($arguments);
        }
    }
public static function sort ( CommandInterface $ command , $ prefix ) { if ( $ arguments = $ command -> getArguments ( ) ) { $ arguments [ 0 ] = "$prefix{$arguments[0]}" ; if ( ( $ count = count ( $ arguments ) ) > 1 ) { for ( $ i = 1 ; $ i < $ count ; ++ $ i ) { switch ( strtoupper ( $ arguments [ $ i ] ) ) { case 'BY' : case 'STORE' : $ arguments [ $ i ] = "$prefix{$arguments[++$i]}" ; break ; case 'GET' : $ value = $ arguments [ ++ $ i ] ; if ( $ value !== '#' ) { $ arguments [ $ i ] = "$prefix$value" ; } break ; case 'LIMIT' ; $ i += 2 ; break ; } } } $ command -> setRawArguments ( $ arguments ) ; } }
Applies the specified prefix to the keys of a SORT command.

@param CommandInterface $command Command instance.
@param string           $prefix  Prefix string.
Applies the specified prefix to the keys of a SORT command .