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,30 @@
<?php
class DownloadDispatcher_Source_PluginFactory extends DownloadDispatcher_PluginFactory {
protected static $plugin_prefix = 'DownloadDispatcher_Source_Plugin_';
protected static $plugin_interface = 'DownloadDispatcher_Source_IPlugin';
protected static $plugin_dir = array(
DownloadDispatcher_Lib => 'DownloadDispatcher/Source/Plugin/',
);
public static function init() {
}
public static function create($plugin, SihnonFramework_Config $config, SihnonFramework_Log $log) {
self::ensureScanned();
if (! self::isValidPlugin($plugin)) {
throw new Sihnon_Exception_InvalidPluginName($plugin);
}
$classname = self::classname($plugin);
return call_user_func(array($classname, 'create'), $config, $log);
}
}
?>