API / Minn\Front / SitemapXml

SitemapXml final class

Minn\Front\SitemapXml · public/minn/src/Minn/Front/SitemapXml.php · 49 lines

The two sitemap documents, index and URL set, from entry maps; one builder for the engine's routes and the facade's renderer. An element with nothing inside closes itself, at every level, as the reference's XML writer prints it (probe sitemap-classes).

Uses 1

Public

staticindex(array $entries, ?string $stylesheet): string#

A sitemap index document.

$entrieslist<array<string, string|null>>each a map of element name => text; null values are skipped
staticurlset(array $entries, ?string $stylesheet): string#

A sitemap urlset document.

$entrieslist<array<string, string|null>>

Internals 3

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateelements(string $tag, array $entries): string#
privateelement(string $tag, string $inner, string $attributes = ''): string#

One element: closed on itself when empty.

privatedocument(?string $stylesheet, string $body): string#