public function FeedsImporter::copy in Feeds 6
Same name and namespace in other branches
- 7.2 includes/FeedsImporter.inc \FeedsImporter::copy()
- 7 includes/FeedsImporter.inc \FeedsImporter::copy()
Copy a FeedsImporter configuration into this importer.
Parameters
FeedsImporter $importer: The feeds importer object to copy from.
Overrides FeedsConfigurable::copy
File
- includes/
FeedsImporter.inc, line 184 - FeedsImporter class and related.
Class
- FeedsImporter
- A FeedsImporter object describes how an external source should be fetched, parsed and processed. Feeds can manage an arbitrary amount of importers.
Code
public function copy(FeedsConfigurable $importer) {
$this
->setConfig($importer->config);
// Instantiate new fetcher, parser and processor and initialize their
// configurations.
foreach ($this->plugin_types as $plugin_type) {
$this
->setPlugin($importer->config[$plugin_type]['plugin_key']);
$this->{$plugin_type}
->setConfig($importer->config[$plugin_type]['config']);
}
}