src/Connection/Aggregate/SentinelReplication.php
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;
    }
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;
    }
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 ; }
Returns the current sentinel connection.

If there is no active sentinel connection, a new connection is created.

@return NodeConnectionInterface
Returns the current sentinel connection .