__construct ( $options )

Constructs a new instance of AmazonCloudFront.

Access

public

Parameters

Parameter

Type

Required

Description

$options

array

Optional

An associative array of parameters that can have the following keys:

  • certificate_authority - boolean - Optional - Determines which Cerificate Authority file to use. A value of boolean false will use the Certificate Authority file available on the system. A value of boolean true will use the Certificate Authority provided by the SDK. Passing a file system path to a Certificate Authority file (chmodded to 0755) will use that. Leave this set to false if you’re not sure.
  • credentials - string - Optional - The name of the credential set to use for authentication.
  • default_cache_config - string - Optional - This option allows a preferred storage type to be configured for long-term caching. This can be changed later using the set_cache_config() method. Valid values are: apc, xcache, or a file system path such as ./cache or /tmp/cache/.
  • key - string - Optional - Your AWS key, or a session key. If blank, the default credential set will be used.
  • secret - string - Optional - Your AWS secret key, or a session secret key. If blank, the default credential set will be used.
  • token - string - Optional - An AWS session token.

Source

Method defined in services/cloudfront.class.php | Toggle source view (14 lines) | View on GitHub

public function __construct(array $options = array())
{
    $this->api_version = '2012-03-15';
    $this->hostname = self::DEFAULT_URL;
    $this->auth_class = 'AuthV2REST';

    $this->base_xml = '<?xml version="1.0" encoding="UTF-8"?><%s xmlns="http://cloudfront.amazonaws.com/doc/' . $this->api_version . '/"></%1$s>';

    parent::__construct($options);

    // Set a default key pair ID and private key
    $this->key_pair_id = $this->credentials->cloudfront_keypair;
    $this->private_key = $this->credentials->cloudfront_pem;
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback