Zendesk\API\HttpClient::__construct PHP Method

__construct() public method

public __construct ( string $subdomain, string $username = '', string $scheme = "https", string $hostname = "zendesk.com", integer $port = 443, Client $guzzle = null )
$subdomain string
$username string
$scheme string
$hostname string
$port integer
$guzzle GuzzleHttp\Client
    public function __construct($subdomain, $username = '', $scheme = "https", $hostname = "zendesk.com", $port = 443, $guzzle = null)
    {
        if (is_null($guzzle)) {
            $this->guzzle = new \GuzzleHttp\Client();
        } else {
            $this->guzzle = $guzzle;
        }
        $this->subdomain = $subdomain;
        $this->hostname = $hostname;
        $this->scheme = $scheme;
        $this->port = $port;
        if (empty($subdomain)) {
            $this->apiUrl = "{$scheme}://{$hostname}:{$port}/";
        } else {
            $this->apiUrl = "{$scheme}://{$subdomain}.{$hostname}:{$port}/";
        }
        $this->debug = new Debug();
        $this->helpCenter = new HelpCenter($this);
        $this->voice = new Voice($this);
        $this->embeddable = new Embeddable($this);
    }