PrefixHelpers.php 502 B

1234567891011121314151617181920
  1. <?php
  2. namespace Predis\Commands;
  3. class PrefixHelpers {
  4. public static function multipleKeys(Array $arguments, $prefix) {
  5. foreach ($arguments as &$key) {
  6. $key = "$prefix$key";
  7. }
  8. return $arguments;
  9. }
  10. public static function skipLastArgument(Array $arguments, $prefix) {
  11. $length = count($arguments);
  12. for ($i = 0; $i < $length - 1; $i++) {
  13. $arguments[$i] = "$prefix{$arguments[$i]}";
  14. }
  15. return $arguments;
  16. }
  17. }