Started hacking a bit on the new MULTI and EXEC commands.

This commit is contained in:
Daniele Alessandri
2009-12-27 22:44:47 +01:00
parent abbc9108e0
commit a13d0e4d72
+20
View File
@@ -886,6 +886,16 @@ class RedisServer__V1_2 extends RedisServer__V1_0 {
}
}
class RedisServer__Futures extends RedisServer__V1_2 {
public function getVersion() { return 0; }
public function getSupportedCommands() {
return array_merge(parent::getSupportedCommands(), array(
'multi' => '\Predis\Commands\Multi',
'exec' => '\Predis\Commands\Exec'
));
}
}
/* ------------------------------------------------------------------------- */
namespace Predis\Utilities;
@@ -1362,4 +1372,14 @@ class SlaveOf extends \Predis\InlineCommand {
return count($arguments) === 0 ? array('NO ONE') : $arguments;
}
}
class Multi extends \Predis\InlineCommand {
public function canBeHashed() { return false; }
public function getCommandId() { return 'MULTI'; }
}
class Exec extends \Predis\InlineCommand {
public function canBeHashed() { return false; }
public function getCommandId() { return 'EXEC'; }
}
?>