protected function parseEndElement(\XMLReader $reader)
{
switch ($reader->name) {
case 'hiddenBeforeDateTime':
case 'hiddenAfterDateTime':
case 'creationDateTime':
case 'lastModificationDateTime':
case 'lastPublicationDateTime':
case 'accessRoles':
break;
case 'node':
// update current path
array_pop($this->nodeNameStack);
// update current node identifier
array_pop($this->nodeIdentifierStack);
break;
case 'variant':
// we have collected all data for the node so we save it
$nodeData = array_pop($this->nodeDataStack);
// if XML files lack the identifier for a node, add it here
if (!isset($nodeData['identifier'])) {
$nodeData['identifier'] = Algorithms::generateUUID();
}
$this->persistNodeData($nodeData);
break;
default:
throw new ImportException(sprintf('Unexpected end element <%s> ', $reader->name), 1423578066);
break;
}
}