\CouchbaseCluster

Represents a Couchbase Server Cluster.

It is an entry point to the library, and in charge of opening connections to the Buckets. In addition it can instantiate \Couchbase\ClusterManager to peform cluster-wide operations.

Summary

Methods
Properties
Constants
__construct()
openBucket()
manager()
authenticate()
authenticateAs()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $connstr) 

Create cluster object

Parameters

string $connstr

connection string

openBucket()

openBucket(string  $name = "default", string  $password = "") : \Couchbase\Bucket

Open connection to the Couchbase bucket

Parameters

string $name

Name of the bucket.

string $password

Password of the bucket to override authenticator.

Returns

\Couchbase\Bucket

manager()

manager(string  $username = null, string  $password = null) : \Couchbase\ClusterManager

Open management connection to the Couchbase cluster.

Parameters

string $username

Name of the administrator to override authenticator or NULL.

string $password

Password of the administrator to override authenticator or NULL.

Returns

\Couchbase\ClusterManager

authenticate()

authenticate(\Couchbase\Authenticator  $authenticator) : null

Associate authenticator with Cluster

Parameters

\Couchbase\Authenticator $authenticator

Returns

null

authenticateAs()

authenticateAs(string  $username, string  $password) : null

Create \Couchbase\PasswordAuthenticator from given credentials and associate it with Cluster

Parameters

string $username
string $password

Returns

null