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

getSentinelConnection() публичный Метод

If there is no active sentinel connection, a new connection is created.
public getSentinelConnection ( ) : Predis\Connection\NodeConnectionInterface
Результат Predis\Connection\NodeConnectionInterface
    public function getSentinelConnection()
    {
        if (!$this->sentinelConnection) {
            if (!$this->sentinels) {
                throw new \Predis\ClientException('No sentinel server available for autodiscovery.');
            }
            $sentinel = array_shift($this->sentinels);
            $this->sentinelConnection = $this->createSentinelConnection($sentinel);
        }
        return $this->sentinelConnection;
    }