Update examples.

This commit is contained in:
Daniele Alessandri
2013-12-01 11:28:56 +01:00
parent e049db124c
commit 3c77d3b0c1
15 changed files with 107 additions and 111 deletions
+8 -4
View File
@@ -32,8 +32,7 @@ class IncrementExistingKeysBy extends ScriptCommand
public function getScript()
{
return
<<<LUA
return <<<LUA
local cmd, insert = redis.call, table.insert
local increment, results = ARGV[1], { }
@@ -50,9 +49,14 @@ LUA;
}
}
$client = new Predis\Client($single_server);
$client = new Predis\Client($single_server, array(
'profile' => function ($options) {
$profile = $options->getDefault('profile');
$profile->defineCommand('increxby', 'IncrementExistingKeysBy');
$client->getProfile()->defineCommand('increxby', 'IncrementExistingKeysBy');
return $profile;
}
));
$client->mset('foo', 10, 'foobar', 100);