Add Sync plugins

Add support for synchronising remote content before running the source
dispatchers. First plugin adds Rsync support.
This commit is contained in:
2011-12-12 23:57:05 +00:00
parent 9a954b2b9d
commit 579f735b49
4 changed files with 113 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
<?php
class DownloadDispatcher_Sync_PluginFactory extends DownloadDispatcher_PluginFactory {
protected static $plugin_prefix = 'DownloadDispatcher_Sync_Plugin_';
protected static $plugin_interface = 'DownloadDispatcher_Sync_IPlugin';
protected static $plugin_dir = array(
DownloadDispatcher_Lib => 'DownloadDispatcher/Sync/Plugin/',
);
public static function init() {
}
public static function create($plugin, SihnonFramework_Config $config, SihnonFramework_Log $log, $instance) {
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, $instance);
}
}
?>