You are here

public static function FeedsPlugin::loadMappers in Feeds 8.2

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()

7 calls to FeedsPlugin::loadMappers()
FeedsMapperTaxonomyTest::testSearchByGUID in lib/Drupal/feeds/Tests/FeedsMapperTaxonomyTest.php
Tests mapping to a taxonomy term's guid.
FeedsMapperTaxonomyTest::testSearchByID in lib/Drupal/feeds/Tests/FeedsMapperTaxonomyTest.php
Tests mapping to taxonomy terms by tid.
FeedsNodeProcessor::getMappingTargets in lib/Drupal/feeds/Plugin/feeds/processor/FeedsNodeProcessor.php
Return available mapping targets.
FeedsParser::getMappingSources in lib/Drupal/feeds/Plugin/FeedsParser.php
Declare the possible mapping sources that this parser produces.
FeedsProcessor::map in lib/Drupal/feeds/Plugin/FeedsProcessor.php
Execute mapping on an item.

... See full list

File

lib/Drupal/feeds/Plugin/FeedsPlugin.php, line 105
Definition of FeedsPlugin class.

Class

FeedsPlugin
Implement source interface for all plugins.

Namespace

Drupal\feeds\Plugin

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;
}