implement prefix removel

This commit is contained in:
Tony Piper 2012-11-26 15:23:57 +00:00
parent 3314d407eb
commit 7f1cf35a62

View File

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