Bucket
class Bucket (View source)
Bucket is an object containing functionality for performing bucket level operations against a cluster and for access to scopes and collections.
Methods
Returns a new Scope object representing the default scope.
Returns a new Collection object representing the default collectiom.
Sets the default transcoder to be used when fetching or sending data.
Returns the name of the Bucket.
Executes a view query against the cluster.
Creates a new CollectionManager object for managing collections and scopes.
Creates a new ViewIndexManager object for managing views and design documents.
Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.
Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.
Details
Scope
defaultScope()
Returns a new Scope object representing the default scope.
Collection
defaultCollection()
Returns a new Collection object representing the default collectiom.
Scope
scope(string $name)
Returns a new Scope object representing the given scope.
setTranscoder(callable $encoder, callable $decoder)
Sets the default transcoder to be used when fetching or sending data.
string
name()
Returns the name of the Bucket.
ViewResult
viewQuery(string $designDoc, string $viewName, ViewOptions $options = null)
Executes a view query against the cluster.
CollectionManager
collections()
Creates a new CollectionManager object for managing collections and scopes.
ViewIndexManager
viewIndexes()
Creates a new ViewIndexManager object for managing views and design documents.
ping(mixed $services, mixed $reportId)
Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.
diagnostics(mixed $reportId)
Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.