Permalink
Browse files

implement prefix removel

  • Loading branch information...
1 parent 3314d40 commit 7f1cf35a62d92327f20f7b752e219c50d5fef9a0 @tonypiper tonypiper committed Nov 26, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/Resque/Redis.php
View
@@ -113,5 +113,20 @@ public function __call($name, $args) {
return false;
}
}
+
+ public static function getPrefix()
+ {
+ return self::$defaultNamespace;
+ }
+
+ public static function removePrefix($string)
+ {
+ $prefix=self::getPrefix();
+
+ if (substr($string, 0, strlen($prefix)) == $prefix) {
+ $string = substr($string, strlen($prefix), strlen($string) );
+ }
+ return $string;
+ }
}
?>

0 comments on commit 7f1cf35

Please sign in to comment.