src/Redis/Sentinel.php
public function createMasterClient($name)
    {
        $master = $this->getMasterAddressByName($name);
        if (!isset($master[0], $master[1])) {
            throw new RedisException('Master not found');
        }

        return Factory::client([
            'host' => $master[0],
            'port' => $master[1],
            'timeout' => $this->timeout,
            'persistent' => $this->persistent,
            'database' => $this->database,
            'password' => $this->getPassword(),
        ]);
    }
public function createMasterClient($name)
    {
        $master = $this->getMasterAddressByName($name);
        if (!isset($master[0], $master[1])) {
            throw new RedisException('Master not found');
        }

        return Factory::client([
            'host' => $master[0],
            'port' => $master[1],
            'timeout' => $this->timeout,
            'persistent' => $this->persistent,
            'database' => $this->database,
            'password' => $this->getPassword(),
        ]);
    }
public function createMasterClient ( $ name ) { $ master = $ this -> getMasterAddressByName ( $ name ) ; if ( ! isset ( $ master [ 0 ] , $ master [ 1 ] ) ) { throw new RedisException ( 'Master not found' ) ; } return Factory :: client ( [ 'host' => $ master [ 0 ] , 'port' => $ master [ 1 ] , 'timeout' => $ this -> timeout , 'persistent' => $ this -> persistent , 'database' => $ this -> database , 'password' => $ this -> getPassword ( ) , ] ) ; }
Discover the master node automatically and return an instance of Credis_Client that connects to the master

@param string $name

@return RedisInterface
@throws RedisException
Discover the master node automatically and return an instance of Credis_Client that connects to the master