PHP code example of ganesha-plugin / couchbase-adapter
1. Go to this page and download the library: Download ganesha-plugin/couchbase-adapter library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ganesha-plugin / couchbase-adapter example snippets
// create bucket instance
$cluster = new \Couchbase\Cluster('...');
$authenticator = new \Couchbase\PasswordAuthenticator();
$authenticator->username('...')->password('...');
$cluster->authenticate($authenticator);
$bucket = $cluster->openBucket('...');
$ganesha = \Ackintosh\Ganesha\Builder::build([
..., // other options
'adapter' => new \GaneshaPlugin\Adapter\Couchbase($bucket),
]);