Skip to content

Commit

Permalink
implement prefix removel
Browse files Browse the repository at this point in the history
  • Loading branch information
tonypiper committed Nov 26, 2012
1 parent 3314d40 commit 7f1cf35
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/Resque/Redis.php
Expand Up @@ -113,5 +113,20 @@ public function __call($name, $args) {
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;
}
}
?>

0 comments on commit 7f1cf35

Please sign in to comment.