public function removeVersion($versionPath, $versionName)
{
$this->transport->removeVersion($versionPath, $versionName);
// Adjust the in memory state
$absPath = $versionPath . '/' . $versionName;
if (isset($this->objectsByPath['Node'][$absPath])) {
/** @var $node Node */
$node = $this->objectsByPath['Node'][$absPath];
unset($this->objectsByUuid[$node->getIdentifier()]);
$node->setDeleted();
}
if (isset($this->objectsByPath['Version\\Version'][$absPath])) {
/** @var $version \Jackalope\Version\Version */
$version = $this->objectsByPath['Version\\Version'][$absPath];
unset($this->objectsByUuid[$version->getIdentifier()]);
$version->setDeleted();
}
unset($this->objectsByPath['Node'][$absPath], $this->objectsByPath['Version\\Version'][$absPath]);
$this->cascadeDelete($absPath, false);
$this->cascadeDeleteVersion($absPath);
}