Bucket
in package
implements
BucketInterface
Bucket is an object containing functionality for performing bucket level operations against a cluster and for access to scopes and collections.
Tags
Interfaces, Classes, Traits and Enums
Table of Contents
- $core : resource
- $name : string
- collections() : CollectionManager
- Creates a new CollectionManager object for managing collections and scopes.
- defaultCollection() : Collection
- Returns a new Collection object representing the default collection.
- 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.
Properties
$core
private
resource
$core
$name
private
string
$name
Methods
collections()
Creates a new CollectionManager object for managing collections and scopes.
public
collections() : CollectionManager
Tags
Return values
CollectionManager —defaultCollection()
Returns a new Collection object representing the default collection.
public
defaultCollection() : Collection
Tags
Return values
Collection —defaultScope()
Returns a new Scope object representing the default scope.
public
defaultScope() : Scope
Tags
Return values
Scope —diagnostics()
Returns diagnostics information about connections that the SDK has to the cluster. This does not perform any operations.
public
diagnostics([string|null $reportId = null ]) : mixed
Parameters
- $reportId : string|null = null
-
a name which will be included within the ping result
Tags
Return values
mixed —name()
Returns the name of the Bucket.
public
name() : string
Tags
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|null $services = null ][, mixed|null $reportId = null ]) : mixed
Parameters
- $services : mixed|null = null
-
the services to ping against
- $reportId : mixed|null = null
-
a name which will be included within the ping result
Tags
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
Tags
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
Tags
Return values
mixed —viewIndexes()
Creates a new ViewIndexManager object for managing views and design documents.
public
viewIndexes() : ViewIndexManager
Tags
Return values
ViewIndexManager —viewQuery()
Executes a view query against the cluster.
public
viewQuery(string $designDoc, string $viewName[, ViewOptions|null $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 = null
-
the options to use when executing the query