public function addMap($iterable, \Closure $step, $name) { $sitemap = new Sitemap($iterable, $step); $sitemap->setHost($this->host); if ($this->limit > 0) { $url = dirname($this->url . '/' . $name); $file = explode(".", basename($name)); $ext = array_pop($file); $url = $url . '/' . implode(".", $file) . '-%d.' . $ext; $sitemap->multipleFiles($url, $this->limit); } $sitemap->generate($this->dir . '/' . $name); return $this; }