Permalink
Browse files

Merge pull request #73 from tonypiper/patch-implement-prefix-removal

implement prefix removal
  • Loading branch information...
2 parents 3314d40 + 7f1cf35 commit 22278424c36af120c1d2fc60492c53211cb9d6cd @chrisboulton committed Nov 27, 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 2227842

Please sign in to comment.