Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

implement prefix removal
  • Loading branch information...
commit 22278424c36af120c1d2fc60492c53211cb9d6cd 2 parents 3314d40 + 7f1cf35
@chrisboulton authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/Resque/Redis.php
View
15 lib/Resque/Redis.php
@@ -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;
+ }
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.