private function processSiteMapHandles(UrlResult
$result): void
{ /** @var SitemapHandle $sitemapHandle */
foreach ($this->sitemapHandles
as $host =>
$sitemapHandle) { /** @var Url[] $urls */
$urls =
[];
foreach ($result->
getUrls() as $url) { $newUrl =
clone $url;
$newUrl->
setLoc(empty($newUrl->
getLoc()) ?
$host :
$host . '/' .
$newUrl->
getLoc());
$urls[] =
$newUrl;
} $sitemapHandle->
write($urls);
} } private function finishSitemapHandles(): void
{ /** @var SitemapHandle $sitemapHandle */
foreach ($this->sitemapHandles
as $index =>
$sitemapHandle) {