public function video_zencoder_api::__construct in Video 6.4
Same name and namespace in other branches
- 6.5 plugins/video_zencoder/video_zencoder.lib.inc \video_zencoder_api::__construct()
- 7 modules/video_zencoder/includes/zencoder.inc \video_zencoder_api::__construct()
File
- plugins/
video_zencoder/ video_zencoder.lib.inc, line 23
Class
Code
public function __construct() {
// Create the Zencoder class
$libpath = libraries_get_path('zencoder');
$libfile = $libpath . '/Services/Zencoder.php';
if (!file_exists($libfile)) {
drupal_set_message(t('The Zencoder library 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('video_zencoder_api_key', NULL);
$this->limit = variable_get('amazon_s3_limit', 5);
$this->bucket = variable_get('amazon_s3_bucket', '');
require_once $libfile;
$this->zencoder = new Services_Zencoder($this->access_key);
}