diff --git a/lib/Predis/Commands/ServerEval.php b/lib/Predis/Commands/ServerEval.php index f6b60deb..fe647871 100644 --- a/lib/Predis/Commands/ServerEval.php +++ b/lib/Predis/Commands/ServerEval.php @@ -46,4 +46,14 @@ class ServerEval extends Command { return false; } + + /** + * Calculates the SHA1 hash of the body of the script. + * + * @return string SHA1 hash. + */ + public function getScriptHash() + { + returns sha1($this->getArgument(0)); + } }