protected function FeedsImporter::__construct in Feeds 7.2
Same name and namespace in other branches
- 6 includes/FeedsImporter.inc \FeedsImporter::__construct()
- 7 includes/FeedsImporter.inc \FeedsImporter::__construct()
Instantiate class variables, initialize and configure plugins.
Parameters
string $id: The importer ID.
Overrides FeedsConfigurable::__construct
File
- includes/FeedsImporter.inc, line 70 
- FeedsImporter class and related.
Class
- FeedsImporter
- Class for a Feeds importer.
Code
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;
  }
}