protected function FeedsImporter::__construct in Feeds 8.2
Instantiate class variables, initialize and configure plugins.
Overrides FeedsConfigurable::__construct
File
- lib/
Drupal/ feeds/ FeedsImporter.php, line 44 - 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.
Namespace
Drupal\feedsCode
protected function __construct($id) {
parent::__construct($id);
// Try to load information from database.
$this
->load();
// Instantiate fetcher, parser and processor, set their configuration if
// stored info is available.
foreach ($this->plugin_types as $type) {
$plugin = feeds_plugin($this->config[$type]['plugin_key'], $this->id);
if (isset($this->config[$type]['config'])) {
$plugin
->setConfig($this->config[$type]['config']);
}
$this->{$type} = $plugin;
}
}