You are here

protected function FeedsNodeProcessor::hash in Feeds 6

Same name and namespace in other branches
  1. 7 plugins/FeedsNodeProcessor.inc \FeedsNodeProcessor::hash()

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

Always returns a hash, even with empty, NULL, FALSE: Empty arrays return 40cd750bba9870f18aada2478b24840a Empty/NULL/FALSE strings return d41d8cd98f00b204e9800998ecf8427e

1 call to FeedsNodeProcessor::hash()
FeedsNodeProcessor::process in plugins/FeedsNodeProcessor.inc
Implementation of FeedsProcessor::process().

File

plugins/FeedsNodeProcessor.inc, line 441
Class definition of FeedsNodeProcessor.

Class

FeedsNodeProcessor
Creates nodes from feed items.

Code

protected function hash($item) {
  static $serialized_mappings;
  if (!$serialized_mappings) {
    $serialized_mappings = serialize($this->config['mappings']);
  }
  return hash('md5', serialize($item) . $serialized_mappings);
}