You are here

public function MigrateItemsXML::hash in Migrate 7.2

File

plugins/sources/xml.inc, line 850
Support for migration from XML sources.

Class

MigrateItemsXML
Implementation of MigrateItems, for providing a list of IDs and for retrieving a parsed XML document given an ID from this list.

Code

public function hash($row) {

  // $row->xml is a SimpleXMLElement. Temporarily set it as an XML string
  // to prevent parent::hash() failing when try to create the hash.
  migrate_instrument_start('MigrateItemXML::hash');
  $hash = md5(serialize($row->xml
    ->asXML()));
  migrate_instrument_stop('MigrateItemXML::hash');
  return $hash;
}