public function video_filesystem::__construct in Video 6.4
File
- includes/
filesystem.inc, line 13
Class
Code
public function __construct($filesystem = null) {
//get our configured transcoder.
if (!isset($filesystem)) {
$filesystem = variable_get('vid_filesystem', 'drupal');
}
if (!module_load_include('inc', 'video', '/filesystem/' . $filesystem)) {
$modules = module_list();
foreach ($modules as $module) {
$mobule_files = array();
$module_path = drupal_get_path('module', $module) . '/filesystem';
$mobule_files = file_scan_directory($module_path, '^.*\\.inc$');
if (is_array($mobule_files)) {
foreach ($mobule_files as $file) {
if ($file->name == $filesystem) {
require_once $file->filename;
}
}
}
}
}
if (class_exists($filesystem)) {
$this->filesystem = new $filesystem();
}
else {
drupal_set_message(t('The file system is not configured properly.'), 'error');
}
}