Initial commit

Basic framework for application including two sample plugins: TV and
RouterboardFirmware.
This commit is contained in:
2011-12-12 00:48:50 +00:00
commit 9a954b2b9d
8 changed files with 253 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
class DownloadDispatcher_Processor {
/**
* Entry point for the Download Dispatcher
*
* Iterates over all enabled plugins and moves supported files to the proper destinations
*/
public static function run() {
$main = DownloadDispatcher_Main::instance();
$config = $main->config();
$log = $main->log();
// Find the list of available plugins
DownloadDispatcher_Source_PluginFactory::scan();
$plugins = DownloadDispatcher_Source_PluginFactory::getValidPlugins();
$enabled_plugins = $config->get('sources');
foreach ($plugins as $plugin_name) {
if (in_array($plugin_name, $enabled_plugins)) {
$plugin = DownloadDispatcher_Source_PluginFactory::create($plugin_name, $config, $log);
$plugin->run();
}
}
}
}
?>