ReplaceOptions
in package
Table of Contents
- $cas : string|null
- $durabilityLevel : string|null
- $expirySeconds : int|null
- $expiryTimestamp : int|null
- $preserveExpiry : bool|null
- $timeoutMilliseconds : int|null
- $transcoder : Transcoder
- __construct() : mixed
- build() : ReplaceOptions
- Static helper to keep code more readable
- cas() : ReplaceOptions
- Sets the cas value to use when performing this operation.
- durabilityLevel() : ReplaceOptions
- Sets the durability level to enforce when writing the document.
- encodeDocument() : array<string|int, mixed>
- Delegates encoding of the document to associated transcoder
- expiry() : ReplaceOptions
- Sets the expiry time for the document.
- preserveExpiry() : ReplaceOptions
- Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
- timeout() : ReplaceOptions
- Sets the operation timeout in milliseconds.
- transcoder() : ReplaceOptions
- Associate custom transcoder with the request.
Properties
$cas
private
string|null
$cas
= null
$durabilityLevel
private
string|null
$durabilityLevel
= null
$expirySeconds
private
int|null
$expirySeconds
= null
$expiryTimestamp
private
int|null
$expiryTimestamp
= null
$preserveExpiry
private
bool|null
$preserveExpiry
= 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() : ReplaceOptions
Tags
Return values
ReplaceOptions —cas()
Sets the cas value to use when performing this operation.
public
cas(string $cas) : ReplaceOptions
Parameters
- $cas : string
-
the CAS value to use
Tags
Return values
ReplaceOptions —durabilityLevel()
Sets the durability level to enforce when writing the document.
public
durabilityLevel(string|int $level) : ReplaceOptions
Parameters
- $level : string|int
-
the durability level to enforce
Tags
Return values
ReplaceOptions —encodeDocument()
Delegates encoding of the document to associated transcoder
public
static encodeDocument(ReplaceOptions|null $options, $document) : array<string|int, mixed>
Parameters
- $options : ReplaceOptions|null
- $document :
Tags
Return values
array<string|int, mixed> —expiry()
Sets the expiry time for the document.
public
expiry(int|DateTimeInterface $seconds) : ReplaceOptions
Parameters
- $seconds : int|DateTimeInterface
-
the relative expiry time in seconds or DateTimeInterface object for absolute point in time
Tags
Return values
ReplaceOptions —preserveExpiry()
Sets whether the original expiration should be preserved (by default Replace operation updates expiration).
public
preserveExpiry(bool $shouldPreserve) : ReplaceOptions
Parameters
- $shouldPreserve : bool
-
if true, the expiration time will not be updated
Tags
Return values
ReplaceOptions —timeout()
Sets the operation timeout in milliseconds.
public
timeout(int $milliseconds) : ReplaceOptions
Parameters
- $milliseconds : int
-
the operation timeout to apply
Tags
Return values
ReplaceOptions —transcoder()
Associate custom transcoder with the request.
public
transcoder(Transcoder $transcoder) : ReplaceOptions
Parameters
- $transcoder : Transcoder