InfluxDB\Client::__construct PHP Method

__construct() public method

public __construct ( string $host, integer $port = 8086, string $username = '', string $password = '', boolean $ssl = false, boolean $verifySSL = false, integer $timeout )
$host string
$port integer
$username string
$password string
$ssl boolean
$verifySSL boolean
$timeout integer
    public function __construct($host, $port = 8086, $username = '', $password = '', $ssl = false, $verifySSL = false, $timeout = 0)
    {
        $this->host = (string) $host;
        $this->port = (int) $port;
        $this->username = (string) $username;
        $this->password = (string) $password;
        $this->timeout = (double) $timeout;
        $this->verifySSL = (bool) $verifySSL;
        if ($ssl) {
            $this->scheme = 'https';
            $this->options['verify'] = $verifySSL;
        }
        // the the base URI
        $this->baseURI = sprintf('%s://%s:%d', $this->scheme, $this->host, $this->port);
        // set the default driver to guzzle
        $this->driver = new Guzzle(new \GuzzleHttp\Client(['timeout' => $this->timeout, 'base_uri' => $this->baseURI, 'verify' => $this->verifySSL]));
        $this->admin = new Admin($this);
    }