InsertOptions
in package
Table of Contents
- $durabilityLevel : string|null
- $durabilityTimeoutSeconds : int|null
- $expirySeconds : int|null
- $expiryTimestamp : int|null
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- __construct() : mixed
- build() : InsertOptions
- Static helper to keep code more readable
- durabilityLevel() : InsertOptions
- Sets the durability level to enforce when writing the document.
- encodeDocument() : array<string|int, mixed>
- Delegates encoding of the document to associated transcoder
- expiry() : InsertOptions
- Sets the expiry time for the document.
- timeout() : InsertOptions
- Sets the operation timeout in milliseconds.
- transcoder() : InsertOptions
- Associate custom transcoder with the request.
Properties
$durabilityLevel
private
string|null
$durabilityLevel
= null
$durabilityTimeoutSeconds
private
int|null
$durabilityTimeoutSeconds
= null
$expirySeconds
private
int|null
$expirySeconds
= null
$expiryTimestamp
private
int|null
$expiryTimestamp
= null
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
$transcoder
private
Transcoder
$transcoder
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —build()
Static helper to keep code more readable
public
static build() : InsertOptions
Tags
Return values
InsertOptions —durabilityLevel()
Sets the durability level to enforce when writing the document.
public
durabilityLevel(string|int $level, int|null $timeoutSeconds) : InsertOptions
Parameters
- $level : string|int
-
the durability level to enforce
- $timeoutSeconds : int|null
Tags
Return values
InsertOptions —encodeDocument()
Delegates encoding of the document to associated transcoder
public
static encodeDocument(InsertOptions|null $options, $document) : array<string|int, mixed>
Parameters
- $options : InsertOptions|null
- $document :
Tags
Return values
array<string|int, mixed> —expiry()
Sets the expiry time for the document.
public
expiry(int|DateTimeInterface $seconds) : InsertOptions
Parameters
- $seconds : int|DateTimeInterface
-
the relative expiry time in seconds or DateTimeInterface object for absolute point in time
Tags
Return values
InsertOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : InsertOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
InsertOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : InsertOptions
Parameters
- $transcoder : Transcoder