Documentation

GetReplicaStrategy
in package

Selects the replica that Collection::getReplica() reads from.

Strategies are created through the static factories on this class.

Tags
see
Collection::getReplica()
since
4.6.0

Table of Contents

fromIndex()  : GetReplicaStrategy
Read from the replica at the given index.

Methods

fromIndex()

Read from the replica at the given index.

public static fromIndex(int $replicaIndex[, GetReplicaStrategyFromIndexOptions|null $options = null ]) : GetReplicaStrategy
Parameters
$replicaIndex : int

the replica to read from, one of the ReplicaIndex constants

$options : GetReplicaStrategyFromIndexOptions|null = null

the options for the strategy

Tags
see
ReplicaIndex
throws
InvalidArgumentException

if the index is not one of the ReplicaIndex constants

since
4.6.0
Return values
GetReplicaStrategy —

        

Search results