mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
Merge pull request #73 from tonypiper/patch-implement-prefix-removal
implement prefix removal
This commit is contained in:
commit
22278424c3
@ -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;
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user