You are here

public function StreamWrapperConfiguration::getCloudFront in AmazonS3 7.2

Return value

\Aws\CloudFront\CloudFrontClient

File

src/StreamWrapperConfiguration.php, line 271

Class

StreamWrapperConfiguration
Class to manage S3 stream wrapper configuration.

Namespace

Drupal\amazons3

Code

public function getCloudFront() {
  if (!$this
    ->isCloudFront()) {
    throw new \LogicException('CloudFront is not enabled.');
  }
  return CloudFrontClient::factory(array(
    'private_key' => $this->data['cloudFrontPrivateKey'],
    'key_pair_id' => $this->data['cloudFrontKeyPairId'],
  ));
}