1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- namespace Predis\Command;
- class ServerEval extends AbstractCommand implements PrefixableCommandInterface
- {
-
- public function getId()
- {
- return 'EVAL';
- }
-
- public function prefixKeys($prefix)
- {
- $arguments = $this->getArguments();
- for ($i = 2; $i < $arguments[1] + 2; $i++) {
- $arguments[$i] = "$prefix{$arguments[$i]}";
- }
- $this->setRawArguments($arguments);
- }
-
- protected function canBeHashed()
- {
- return false;
- }
-
- public function getScriptHash()
- {
- return sha1($this->getArgument(0));
- }
- }
|