Skip to main content
Version: Fegg 5.x

Sitemap::count

Number of URLs added

Description​

public int Sitemap::count()

Returns the number of URLs in the sitemap (a URL added twice counts once).

Example​

Controller
use Fegg\Tool\Sitemap;

$sitemap = new Sitemap();
$sitemap->add('/')->add('/news/')->add('/');

$sitemap->count(); // 2