GetOptions
in package
Table of Contents
- decoder() : GetOptions
- Associate custom transcoder with the request.
- project() : GetOptions
- Sets whether to cause the Get operation to only fetch the fields from the document indicated by the paths provided.
- timeout() : GetOptions
- Sets the operation timeout in milliseconds.
- withExpiry() : GetOptions
- Sets whether to include document expiry with the document content.
Methods
decoder()
Associate custom transcoder with the request.
public
decoder(callable $arg) : GetOptions
Parameters
- $arg : callable
-
decoding function with signature (returns decoded value):
function decoder(string $bytes, int $flags, int $datatype): mixed
Return values
GetOptions —project()
Sets whether to cause the Get operation to only fetch the fields from the document indicated by the paths provided.
public
project(array<string|int, mixed> $arg) : GetOptions
When used this option will transparently transform the Get operation into a subdocument operation fetching only the required fields.
Parameters
- $arg : array<string|int, mixed>
-
the array of field names
Return values
GetOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $arg) : GetOptions
Parameters
- $arg : int
-
the operation timeout to apply
Return values
GetOptions —withExpiry()
Sets whether to include document expiry with the document content.
public
withExpiry(bool $arg) : GetOptions
When used this option will transparently transform the Get operation into a subdocument operation performing a full document fetch as well as the expiry.
Parameters
- $arg : bool
-
whether or not to include document expiry