src/Redis/Sentinel.php
public function createSlaveClients($name)
    {
        $slaves = $this->slaves($name);
        $workingSlaves = [];
        foreach ($slaves as $slave) {
            if (!isset($slave[9])) {
                throw new RedisException('Can\' retrieve slave status');
            }
            if (\strpos($slave[9], 's_down') === false && \strpos($slave[9], 'disconnected') === false) {
                $workingSlaves[] = Factory::client([
                    'host' => $slave[3],
                    'port' => $slave[5],
                    'timeout' => $this->timeout,
                    'persistent' => $this->persistent,
                    'database' => $this->database,
                    'password' => $this->getPassword(),
                ]);
            }
        }

        return $workingSlaves;
    }
public function createSlaveClients($name)
    {
        $slaves = $this->slaves($name);
        $workingSlaves = [];
        foreach ($slaves as $slave) {
            if (!isset($slave[9])) {
                throw new RedisException('Can\' retrieve slave status');
            }
            if (\strpos($slave[9], 's_down') === false && \strpos($slave[9], 'disconnected') === false) {
                $workingSlaves[] = Factory::client([
                    'host' => $slave[3],
                    'port' => $slave[5],
                    'timeout' => $this->timeout,
                    'persistent' => $this->persistent,
                    'database' => $this->database,
                    'password' => $this->getPassword(),
                ]);
            }
        }

        return $workingSlaves;
    }
public function createSlaveClients ( $ name ) { $ slaves = $ this -> slaves ( $ name ) ; $ workingSlaves = [ ] ; foreach ( $ slaves as $ slave ) { if ( ! isset ( $ slave [ 9 ] ) ) { throw new RedisException ( 'Can\' retrieve slave status' ) ; } if ( \ strpos ( $ slave [ 9 ] , 's_down' ) === false && \ strpos ( $ slave [ 9 ] , 'disconnected' ) === false ) { $ workingSlaves [ ] = Factory :: client ( [ 'host' => $ slave [ 3 ] , 'port' => $ slave [ 5 ] , 'timeout' => $ this -> timeout , 'persistent' => $ this -> persistent , 'database' => $ this -> database , 'password' => $ this -> getPassword ( ) , ] ) ; } } return $ workingSlaves ; }
Discover the slave nodes automatically and return an array of Credis_Client objects

@param string $name

@return RedisInterface[]
@throws RedisException
Discover the slave nodes automatically and return an array of Credis_Client objects