ganesha-plugin/couchbase-adapter

Couchbase适配器用于ackintosh/ganesha

1.0.1 2018-05-10 21:17 UTC

This package is auto-updated.

Last update: 2024-09-13 02:44:13 UTC


README

Build Status codecov Scrutinizer Code Quality Latest Stable Version

本软件包为ackintosh/ganesha提供Couchbase适配器。

安装

$ composer require ganesha-plugin/couchbase-adapter

如何使用

ackintosh/ganesha一起使用

// 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),
]);

开发

运行单元测试

$ make start                                  # start couchbase server in docker container
$ TEST_COUCHBASE_HOST=localhost composer test # run unit test

许可证

MIT许可证