2013-10-15 41 views
0

我一直在与Doctrine Cache,并希望尝试了Riak提供商:Riak客户端是否使用Doctrine Cache Riak Provider?

// host: localhost, port: 8098 
$client = new \Basho\Riak\Riak($app['host'], $app['port']); 
$bucket = $client->bucket('key_value'); 
$cacheProvider = new \Doctrine\Common\Cache\RiakCache($bucket); 

在我创建了一个客户端中描述的代码的Basho official PHP Client for Riak(见Taste of Riak: PHP),并根据需要通过传递水桶了Riak缓存提供,并得到了以下错误:

PHP Catchable fatal error: Argument 1 passed to 
Doctrine\\Common\\Cache\\RiakCache::__construct() 
must be an instance of Riak\\Bucket, 
instance of Basho\\Riak\\Bucket given. 

此错误消息和unit test for the Riak provider点到不同的客户端,但该学说文档here并未说明了Riak什么。

我不知道Doctrine Cache使用的提供者是官方Riak PHP客户端的旧版本,如果代码有问题,或者提供者使用不同的Riak客户端就像Doctrine riak-php哪个是实验性的,没有关于如何安装和使用它的文档(据我所知)。

回答