You are here

public static function FeedsPlugin::loadMappers in Feeds 7.2

Same name and namespace in other branches
  1. 6 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.

@todo: Use CTools Plugin API.

See also

FeedsNodeProcessor::map()

FeedsUserProcessor::map()

6 calls to FeedsPlugin::loadMappers()
FeedsMapperTaxonomyTestCase::testAllowedVocabularies in tests/feeds_mapper_taxonomy.test
Tests that only term references are added from allowed vocabularies.
FeedsMapperTaxonomyTestCase::testSearchByGUID in tests/feeds_mapper_taxonomy.test
Tests mapping to a taxonomy term's guid.
FeedsMapperTaxonomyTestCase::testSearchByID in tests/feeds_mapper_taxonomy.test
Tests mapping to taxonomy terms by tid.
FeedsMapperTaxonomyTestCase::testTermAccess in tests/feeds_mapper_taxonomy.test
Tests if terms can be mapped when term access modules are enabled.
FeedsParser::getMappingSources in plugins/FeedsParser.inc
Declare the possible mapping sources that this parser produces.

... See full list

File

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

Class

FeedsPlugin
Implement source interface for all plugins.

Code

public 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->uri, '/mappers/')) {
        require_once DRUPAL_ROOT . '/' . $file->uri;
      }
    }
  }
  $loaded = TRUE;
}