Documentation

Bucket
in package

Bucket is an object containing functionality for performing bucket level operations against a cluster and for access to scopes and collections.

Table of Contents

collections()  : CollectionManager
Creates a new CollectionManager object for managing collections and scopes.
defaultCollection()  : Collection
Returns a new Collection object representing the default collectiom.
defaultScope()  : Scope
Returns a new Scope object representing the default scope.
diagnostics()  : mixed
Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.
name()  : string
Returns the name of the Bucket.
ping()  : mixed
Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.
scope()  : Scope
Returns a new Scope object representing the given scope.
setTranscoder()  : mixed
Sets the default transcoder to be used when fetching or sending data.
viewIndexes()  : ViewIndexManager
Creates a new ViewIndexManager object for managing views and design documents.
viewQuery()  : ViewResult
Executes a view query against the cluster.

Methods

defaultCollection()

Returns a new Collection object representing the default collectiom.

public defaultCollection() : Collection
Return values
Collection

defaultScope()

Returns a new Scope object representing the default scope.

public defaultScope() : Scope
Return values
Scope

diagnostics()

Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.

public diagnostics(mixed $reportId) : mixed
Parameters
$reportId : mixed

a name which will be included within the ping result

Return values
mixed

name()

Returns the name of the Bucket.

public name() : string
Return values
string

ping()

Executes a ping for each service against each node in the cluster. This can be used for determining the current health of the cluster.

public ping(mixed $services, mixed $reportId) : mixed
Parameters
$services : mixed

the services to ping against

$reportId : mixed

a name which will be included within the ping result

Return values
mixed

scope()

Returns a new Scope object representing the given scope.

public scope(string $name) : Scope
Parameters
$name : string

the name of the scope

Return values
Scope

setTranscoder()

Sets the default transcoder to be used when fetching or sending data.

public setTranscoder(callable $encoder, callable $decoder) : mixed
Parameters
$encoder : callable

the encoder to use to encode data when sending data to the server

$decoder : callable

the decoder to use to decode data when retrieving data from the server

Return values
mixed

viewQuery()

Executes a view query against the cluster.

public viewQuery(string $designDoc, string $viewName[, ViewOptions $options = null ]) : ViewResult
Parameters
$designDoc : string

the design document to use for the query

$viewName : string

the view to use for the query

$options : ViewOptions = null

the options to use when executing the query

Return values
ViewResult

Search results