__construct ( $url, $proxy, $helpers, $credentials )

Constructs a new instance of this class.

Access

public

Parameters

Parameter

Type

Required

Description

$url

string

Optional

The URL to request or service endpoint to query.

$proxy

string

Optional

The faux-url to use for proxy settings. Takes the following format: proxy://user:pass@hostname:port

$helpers

array

Optional

An associative array of classnames to use for request, and response functionality. Gets passed in automatically by the calling class.

$credentials

CFCredential

Optional

The credentials to use for signing and making requests.

Returns

Type

Description

$this

A reference to the current instance.

Source

Method defined in utilities/request.class.php | Toggle source view (16 lines) | View on GitHub

public function __construct($url = null, $proxy = null, $helpers = null, CFCredential $credentials = null)
{
    parent::__construct($url, $proxy, $helpers);

    // Standard settings for all requests
    $this->set_useragent(CFRUNTIME_USERAGENT);
    $this->credentials = $credentials;
    $this->cacert_location = ($this->credentials['certificate_authority'] ? $this->credentials['certificate_authority'] : false);

    if (strpos(parse_url($url, PHP_URL_HOST), 'dynamodb') === 0)
        {
            $this->use_gzip_enconding = false;
        }

    return $this;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback