You are here

protected static function FeedsPlugin::loadMappers in Feeds 6

Same name and namespace in other branches
  1. 7.2 plugins/FeedsPlugin.inc \FeedsPlugin::loadMappers()
  2. 7 plugins/FeedsPlugin.inc \FeedsPlugin::loadMappers()

Loads on-behalf implementations from mappers/ directory.

FeedsProcessor::map() does not load from mappers/ as only node and user processor ship with on-behalf implementations.

See also

FeedsNodeProcessor::map()

FeedsUserProcessor::map()

4 calls to FeedsPlugin::loadMappers()
FeedsNodeProcessor::getMappingTargets in plugins/FeedsNodeProcessor.inc
Return available mapping targets.
FeedsParser::getMappingSources in plugins/FeedsParser.inc
Declare the possible mapping sources that this parser produces.
FeedsProcessor::map in plugins/FeedsProcessor.inc
Execute mapping on an item.
FeedsUserProcessor::getMappingTargets in plugins/FeedsUserProcessor.inc
Return available mapping targets.

File

plugins/FeedsPlugin.inc, line 86
Definition of FeedsPlugin class.

Class

FeedsPlugin
Implement source interface for all plugins.

Code

protected static function loadMappers() {
  static $loaded = FALSE;
  if (!$loaded) {
    $path = drupal_get_path('module', 'feeds') . '/mappers';
    $files = drupal_system_listing('.*\\.inc$', $path, 'name', 0);
    foreach ($files as $file) {
      if (strstr($file->filename, '/mappers/')) {
        require_once "./{$file->filename}";
      }
    }

    // Rebuild cache.
    module_implements('', FALSE, TRUE);
  }
  $loaded = TRUE;
}