You are here

protected function FeedsProcessor::getSourceValue in Feeds 7.2

Returns the values from the parser, or callback.

Parameters

FeedsSource $source: The feed source.

FeedsParserResult $result: The parser result.

string $source_key: The current key being processed.

Return value

mixed A value, or a list of values.

1 call to FeedsProcessor::getSourceValue()
FeedsProcessor::map in plugins/FeedsProcessor.inc
Execute mapping on an item.

File

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

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

protected function getSourceValue(FeedsSource $source, FeedsParserResult $result, $source_key) {
  $sources = $this
    ->getCachedSources();
  if (isset($sources[$source_key]['callback'])) {
    return call_user_func($sources[$source_key]['callback'], $source, $result, $source_key);
  }
  return feeds_importer($this->id)->parser
    ->getSourceElement($source, $result, $source_key);
}