メインコンテンツまでスキップ
Version: Fegg 5.x

Sitemap::count

追加したURLの数

説明​

public int Sitemap::count()

サイトマップにあるURLの数を返します(2回追加したURLは1件と数えます)。

例​

Controller
use Fegg\Tool\Sitemap;

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

$sitemap->count(); // 2