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

implement prefix removal
This commit is contained in:
Chris Boulton 2012-11-27 02:10:15 -08:00
commit 22278424c3

View File

@ -113,5 +113,20 @@ class Resque_Redis extends Redisent
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;
}
}
?>