Skip to content

Commit

Permalink
Merge pull request chrisboulton#73 from tonypiper/patch-implement-pre…
Browse files Browse the repository at this point in the history
…fix-removal

implement prefix removal
  • Loading branch information
chrisboulton committed Nov 27, 2012
2 parents 3314d40 + 7f1cf35 commit 2227842
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 2227842

Please sign in to comment.