public function purgeDisappearedNode($absPath, $keepChanges)
{
if (array_key_exists($absPath, $this->objectsByPath['Node'])) {
$item = $this->objectsByPath['Node'][$absPath];
if ($keepChanges && ($item->isNew() || $this->getMoveSrcPath($absPath))) {
// we keep changes and this is a new node or it moved here
return false;
}
// may not use $item->getIdentifier here - leads to endless loop if node purges itself
$uuid = array_search($absPath, $this->objectsByUuid);
if (false !== $uuid) {
unset($this->objectsByUuid[$uuid]);
}
unset($this->objectsByPath['Node'][$absPath]);
$item->setDeleted();
}
// if the node moved away from this node, we did not find it in
// objectsByPath and the calling parent node can forget it
return true;
}