mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
implement prefix removel
This commit is contained in:
parent
3314d407eb
commit
7f1cf35a62
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user