You are here

protected function FeedsProcessor::getCachedSources in Feeds 7.2

Returns a statically cached version of the source mappings.

Return value

array The sources for this importer.

1 call to FeedsProcessor::getCachedSources()
FeedsProcessor::getSourceValue in plugins/FeedsProcessor.inc
Returns the values from the parser, or callback.

File

plugins/FeedsProcessor.inc, line 821
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

protected function getCachedSources() {
  $sources =& drupal_static('FeedsProcessor::getCachedSources', array());
  if (!isset($sources[$this->id])) {
    $sources[$this->id] = feeds_importer($this->id)->parser
      ->getMappingSources();
    if (is_array($sources[$this->id])) {
      foreach ($sources[$this->id] as $source_key => $source) {
        if (empty($source['callback']) || !is_callable($source['callback'])) {
          unset($sources[$this->id][$source_key]['callback']);
        }
      }
    }
  }
  return $sources[$this->id];
}