GetOptions
in package
Table of Contents
- $projections : array<string|int, mixed>|null
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- $withExpiry : bool
- __construct() : mixed
- build() : GetOptions
- Static helper to keep code more readable
- getTranscoder() : Transcoder
- Returns associated transcoder.
- 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.
- transcoder() : GetOptions
- Associate custom transcoder with the request.
- withExpiry() : GetOptions
- Sets whether to include document expiry with the document content.
Properties
$projections
private
array<string|int, mixed>|null
$projections
= null
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
$transcoder
private
Transcoder
$transcoder
$withExpiry
private
bool
$withExpiry
= false
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —build()
Static helper to keep code more readable
public
static build() : GetOptions
Tags
Return values
GetOptions —getTranscoder()
Returns associated transcoder.
public
static getTranscoder(GetOptions|null $options) : Transcoder
Parameters
- $options : GetOptions|null
Tags
Return values
Transcoder —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> $projections) : GetOptions
When used this option will transparently transform the Get operation into a subdocument operation fetching only the required fields.
Parameters
- $projections : array<string|int, mixed>
-
the array of field names (array of strings)
Tags
Return values
GetOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : GetOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
GetOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : GetOptions
Parameters
- $transcoder : Transcoder
Tags
Return values
GetOptions —withExpiry()
Sets whether to include document expiry with the document content.
public
withExpiry(bool $fetchExpiry) : 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
- $fetchExpiry : bool
-
whether to include document expiry