ClusterOption
in package
implements
OptionInterface
Configures an aggregate connection used for clustering multiple Redis nodes using various implementations with different algorithms or strategies.
Tags
Interfaces, Classes and Traits
- OptionInterface
- Defines an handler used by Predis\Configuration\Options to filter, validate or return default values for a given option.
Table of Contents
- filter() : mixed
- Filters and validates the passed value.
- getDefault() : mixed
- Returns the default value for the option.
- createByDescription() : ClusterInterface|null
- Creates a new cluster connection from on a known descriptive name.
Methods
filter()
Filters and validates the passed value.
public
filter(OptionsInterface $options, mixed $value) : mixed
Parameters
- $options : OptionsInterface
-
Options container.
- $value : mixed
-
Input value.
Return values
mixed —getDefault()
Returns the default value for the option.
public
getDefault(OptionsInterface $options) : mixed
Parameters
- $options : OptionsInterface
-
Options container.
Return values
mixed —createByDescription()
Creates a new cluster connection from on a known descriptive name.
protected
createByDescription(OptionsInterface $options, string $id) : ClusterInterface|null
Parameters
- $options : OptionsInterface
-
Instance of the client options.
- $id : string
-
Descriptive identifier of the cluster type (
predis
,redis-cluster
)