mirror of
https://github.com/predis/predis.git
synced 2026-09-15 12:57:10 +00:00
Returns the SHA1 hash of a Lua script from instances of ServerEval.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user