Change Predis\Commands\Preprocessors to Predis\Command\Processors.

This commit is contained in:
Daniele Alessandri
2011-05-04 11:23:31 +02:00
parent 812d37b2d4
commit 09b5d7ac61
11 changed files with 108 additions and 108 deletions
+3 -3
View File
@@ -2,16 +2,16 @@
require 'SharedConfigurations.php';
// Predis ships with a KeyPrefixPreprocessor class that is used to transparently
// Predis ships with a KeyPrefixProcessor class that is used to transparently
// prefix each key before sending commands to Redis, even for complex commands
// such as SORT, ZUNIONSTORE and ZINTERSTORE. Key prefixes are useful to create
// user-level namespaces for you keyspace, thus eliminating the need for separate
// logical databases.
use Predis\Commands\Preprocessors\KeyPrefixPreprocessor;
use Predis\Commands\Processors\KeyPrefixProcessor;
$client = new Predis\Client();
$client->getProfile()->setPreprocessor(new KeyPrefixPreprocessor('nrk:'));
$client->getProfile()->setProcessor(new KeyPrefixProcessor('nrk:'));
$client->mset(array('foo' => 'bar', 'lol' => 'wut'));
var_dump($client->mget('foo', 'lol'));