CoolCMS API

SitemapIndex
in package

FinalYes

Sitemap index over the `sitemap-*.xml` files in the sitemap directory.

The index lists exactly the files present: temporary files of a generation in progress end with .tmp (the pattern does not match them) and old buckets are removed by the commit of the new generation (SitemapBucketWriter::stalePattern()).

Table of Contents

Methods

buildXml()  : string
collectEntries()  : array<int, array{filename: string, lastmod: string}>

Methods

buildXml()

public static buildXml(array<int, array{filename: string, lastmod: string}> $entries, string $locationPrefix) : string
Parameters
$entries : array<int, array{filename: string, lastmod: string}>
$locationPrefix : string

absolute URL of the sitemap directory including the trailing /

Return values
string

collectEntries()

public static collectEntries(string $dir) : array<int, array{filename: string, lastmod: string}>
Parameters
$dir : string
Return values
array<int, array{filename: string, lastmod: string}>
On this page

Search results