You are here

public function video_amazon_s3::__construct in Video 6.5

Same name and namespace in other branches
  1. 6.4 plugins/video_s3/video_s3.lib.inc \video_amazon_s3::__construct()

File

plugins/video_s3/video_s3.lib.inc, line 24
Class file to handle amazon s3 transfers.

Class

video_amazon_s3

Code

public function __construct() {

  // Create the Zencoder class
  $libpath = libraries_get_path('awssdk');
  $this->libfile = $libpath . '/sdk.class.php';
  if (!file_exists($this->libfile)) {
    drupal_set_message(t('The Amazon SDK for PHP has not been installed correctly. See the <a href="@drupal-status-page">Drupal status page</a> for more information.', array(
      '@drupal-status-page' => url('admin/reports/status'),
    )), 'error');
    return;
  }
  $this->access_key = variable_get('amazon_s3_access_key', '');
  $this->secret_key = variable_get('amazon_s3_secret_access_key', '');
  $this->ssl = variable_get('amazon_s3_ssl', FALSE);
  $this->bucket = variable_get('amazon_s3_bucket', '');
}