Documentation

ReplaceOptions

Table of Contents

cas()  : ReplaceOptions
Sets the cas value for the operation.
durabilityLevel()  : ReplaceOptions
Sets the durability level to enforce when writing the document.
encoder()  : ReplaceOptions
Associate custom transcoder with the request.
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.

Methods

durabilityLevel()

Sets the durability level to enforce when writing the document.

public durabilityLevel(int $arg) : ReplaceOptions
Parameters
$arg : int

the durability level to enforce

Return values
ReplaceOptions

encoder()

Associate custom transcoder with the request.

public encoder(callable $arg) : ReplaceOptions
Parameters
$arg : callable

encoding function with signature (returns tuple of bytes, flags and datatype):

function encoder($value): [string $bytes, int $flags, int $datatype]

Return values
ReplaceOptions

expiry()

Sets the expiry time for the document.

public expiry(int|DateTimeInterface $arg) : ReplaceOptions
Parameters
$arg : int|DateTimeInterface

the relative expiry time in seconds or DateTimeInterface object for absolute point in time

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

Return values
ReplaceOptions

timeout()

Sets the operation timeout in milliseconds.

public timeout(int $arg) : ReplaceOptions
Parameters
$arg : int

the operation timeout to apply

Return values
ReplaceOptions

Search results