IncrementOptions
in package
Table of Contents
- $delta : int
- $durabilityLevel : string|null
- $expirySeconds : int|null
- $expiryTimestamp : int|null
- $initialValue : int|null
- $timeoutMilliseconds : int|null
- build() : IncrementOptions
- Static helper to keep code more readable
- delta() : IncrementOptions
- Sets the value to increment the counter by.
- durabilityLevel() : IncrementOptions
- Sets the durability level to enforce when writing the document.
- expiry() : IncrementOptions
- Sets the expiry time for the document.
- initial() : IncrementOptions
- Sets the value to initialize the counter to if the document does not exist.
- timeout() : IncrementOptions
- Sets the operation timeout in milliseconds.
Properties
$delta
private
int
$delta
= 1
$durabilityLevel
private
string|null
$durabilityLevel
= null
$expirySeconds
private
int|null
$expirySeconds
= null
$expiryTimestamp
private
int|null
$expiryTimestamp
= null
$initialValue
private
int|null
$initialValue
= null
$timeoutMilliseconds
private
int|null
$timeoutMilliseconds
= null
Methods
build()
Static helper to keep code more readable
public
static build() : IncrementOptions
Tags
Return values
IncrementOptions —delta()
Sets the value to increment the counter by.
public
delta(int $increment) : IncrementOptions
Parameters
- $increment : int
-
the value to increment by
Tags
Return values
IncrementOptions —durabilityLevel()
Sets the durability level to enforce when writing the document.
public
durabilityLevel(string|int $level) : IncrementOptions
Parameters
- $level : string|int
-
the durability level to enforce
Tags
Return values
IncrementOptions —expiry()
Sets the expiry time for the document.
public
expiry(int|DateTimeInterface $seconds) : IncrementOptions
Parameters
- $seconds : int|DateTimeInterface
-
the relative expiry time in seconds or DateTimeInterface object for absolute point in time
Tags
Return values
IncrementOptions —initial()
Sets the value to initialize the counter to if the document does not exist.
public
initial(int $initialValue) : IncrementOptions
Parameters
- $initialValue : int
-
the initial value to use if counter does not exist
Tags
Return values
IncrementOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : IncrementOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply