Predis\Connection\Aggregate\SentinelReplication::createSentinelConnection PHP Метод

createSentinelConnection() защищенный Метод

Creates a new connection to a sentinel server.
protected createSentinelConnection ( $parameters ) : Predis\Connection\NodeConnectionInterface
Результат Predis\Connection\NodeConnectionInterface
    protected function createSentinelConnection($parameters)
    {
        if ($parameters instanceof NodeConnectionInterface) {
            return $parameters;
        }
        if (is_string($parameters)) {
            $parameters = Parameters::parse($parameters);
        }
        if (is_array($parameters)) {
            // We explicitly set "database" and "password" to null,
            // so that no AUTH and SELECT command is send to the sentinels.
            $parameters['database'] = null;
            $parameters['password'] = null;
            if (!isset($parameters['timeout'])) {
                $parameters['timeout'] = $this->sentinelTimeout;
            }
        }
        $connection = $this->connectionFactory->create($parameters);
        return $connection;
    }