You are here

public static function CloudFrontClient::factory in AmazonS3 7.2

Override factory() to set credential defaults.

1 call to CloudFrontClient::factory()
StreamWrapperConfiguration::getCloudFront in src/StreamWrapperConfiguration.php

File

src/CloudFrontClient.php, line 15

Class

CloudFrontClient
@class CloudFrontClient @package Drupal\amazons3

Namespace

Drupal\amazons3

Code

public static function factory($config = array()) {
  if (!isset($config['private_key'])) {
    $config['private_key'] = static::variable_get('amazons3_cloudfront_private_key');
    $config['key_pair_id'] = static::variable_get('amazons3_cloudfront_keypair_id');
  }
  return parent::factory($config);
}