You are here

protected function FeedsProcessor::hash in Feeds 7.2

Create MD5 hash of item and mappings array.

Include mappings as a change in mappings may have an affect on the item produced.

Return value

string A hash is always returned, even when the item is empty, NULL or FALSE.

1 call to FeedsProcessor::hash()
FeedsProcessor::process in plugins/FeedsProcessor.inc
Process the result of the parsing stage.

File

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

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

protected function hash($item) {
  $sources = feeds_importer($this->id)->parser
    ->getMappingSourceList();
  $mapped_item = array_intersect_key($item, array_flip($sources));
  return hash('md5', serialize($mapped_item) . serialize($this
    ->getMappings()));
}