protected function getConnectionInitializerByDescription(OptionsInterface $options, $description)
    {
        if ($description === 'predis') {
            $callback = $this->getDefault($options);
        } elseif ($description === 'sentinel') {
            $callback = function ($options, $sentinels) {
                return new SentinelReplication($options->service, $sentinels, $options->connections);
            };
        } else {
            throw new \InvalidArgumentException(
                'String value for the replication option must be either `predis` or `sentinel`'
            );
        }

        return $this->getConnectionInitializer($options, $callback);
    }
protected function getConnectionInitializerByDescription(OptionsInterface $options, $description)
    {
        if ($description === 'predis') {
            $callback = $this->getDefault($options);
        } elseif ($description === 'sentinel') {
            $callback = function ($options, $sentinels) {
                return new SentinelReplication($options->service, $sentinels, $options->connections);
            };
        } else {
            throw new \InvalidArgumentException(
                'String value for the replication option must be either `predis` or `sentinel`'
            );
        }

        return $this->getConnectionInitializer($options, $callback);
    }
Returns a connection initializer from a descriptive name.

@param OptionsInterface $options     Client options.
@param string           $description Identifier of a replication backend (`predis`, `sentinel`)

@return callable