/** * @param \Sitemapper\Url $url */ public function addUrl(Url $url) { $this->boot(); // If current map reached the max allowed urls, boot next map if ($this->currentSitemap->count() + 1 > $this->maxAllowedUrls) { if ($this->autoSave) { $this->saveSitemap($this->currentSitemap); $this->saveIndex(); } // Boot next map $this->bootSitemap(); } // Check if map is saved! $this->currentSitemap->addUrl($url); }