/** * */ protected function setSiteMapLocation() { $siteMapIndexEntity = $this->dumpEntity->getSiteMapIndexEntity(); $counter = 0; foreach ($siteMapIndexEntity->getSiteMapCollection() as $siteMapEntity) { $loc = $siteMapEntity->getLoc(); if (empty($loc)) { $siteMapEntity->setLoc($this->dumpEntity->getProtocol() . '://' . $this->dumpEntity->getDomain() . ($this->dumpEntity->getPath() !== '' ? '/' . $this->dumpEntity->getPath() . '/' : '/') . 'sitemap' . $counter++ . '.xml'); } } }