Doctrine\Common\Cache\CouchbaseCache::setCouchbase PHP Méthode

setCouchbase() public méthode

Sets the Couchbase instance to use.
public setCouchbase ( Couchbase $couchbase ) : void
$couchbase Couchbase
Résultat void
    public function setCouchbase(Couchbase $couchbase)
    {
        $this->couchbase = $couchbase;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function getAdapter(array $config)
 {
     $couchbase = new Couchbase($config['host'], $config['user'], $config['password'], $config['bucket']);
     $client = new CouchbaseCache();
     $client->setCouchbase($couchbase);
     return new DoctrineCachePool($client);
 }
All Usage Examples Of Doctrine\Common\Cache\CouchbaseCache::setCouchbase