Skip to content

Commit 2227842

Browse files
committed
Merge pull request #73 from tonypiper/patch-implement-prefix-removal
implement prefix removal
2 parents 3314d40 + 7f1cf35 commit 2227842

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/Resque/Redis.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,20 @@ public function __call($name, $args) {
113113
return false;
114114
}
115115
}
116+
117+
public static function getPrefix()
118+
{
119+
return self::$defaultNamespace;
120+
}
121+
122+
public static function removePrefix($string)
123+
{
124+
$prefix=self::getPrefix();
125+
126+
if (substr($string, 0, strlen($prefix)) == $prefix) {
127+
$string = substr($string, strlen($prefix), strlen($string) );
128+
}
129+
return $string;
130+
}
116131
}
117132
?>

0 commit comments

Comments
 (0)