You are here

protected function FeedsCommentProcessor::hash in Feeds Comment Processor 6

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 FeedsCommentProcessor::hash()
FeedsCommentProcessor::process in ./FeedsCommentProcessor.inc
Implementation of FeedsProcessor::process().

File

./FeedsCommentProcessor.inc, line 376
Class definition of FeedsCommentProcessor.

Class

FeedsCommentProcessor
Creates comments 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);
}