Credis_Sentinel::__construct PHP Method

__construct() public method

Connect with a Sentinel node. Sentinel will do the master and slave discovery
public __construct ( Credis_Client $client, string $password = NULL )
$client Credis_Client
$password string (deprecated - use setClientPassword)
    public function __construct(Credis_Client $client, $password = NULL)
    {
        if (!$client instanceof Credis_Client) {
            throw new CredisException('Sentinel client should be an instance of Credis_Client');
        }
        $client->forceStandalone();
        // SENTINEL command not currently supported by phpredis
        $this->_client = $client;
        $this->_password = $password;
        $this->_timeout = NULL;
        $this->_persistent = '';
        $this->_db = 0;
    }