GetReplicaStrategy
in package
Selects the replica that Collection::getReplica() reads from.
Strategies are created through the static factories on this class.
Tags
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