public function MigrateItemXML::hash in Migrate 7.2
Implments MigrateItem::hash().
File
- plugins/
sources/ xml.inc, line 274 - Support for migration from XML sources.
Class
- MigrateItemXML
- Implementation of MigrateItem, for retrieving a parsed XML document given an ID provided by a MigrateList class.
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;
}