API / Minn\Front / SitemapRequest

SitemapRequest final class

Minn\Front\SitemapRequest · public/minn/src/Minn/Front/SitemapRequest.php · 79 lines

A sitemap request at template_redirect, as the reference's sitemaps server answers it: a sitemap address asked for another way (the query form, page 0) moves to its own; with the sitemaps off, a provider nobody registered, or a subtype or page that has nothing, the request is a 404 the theme renders; otherwise the stylesheet, the index or the provider's page is printed and the request ends. Since 7.1.3 this is where a sitemap page is judged: the main query no longer makes an empty page a 404 first, so a page a plugin fills past the page count still prints.

Public

staticurl(mixed $name, mixed $subtypeName = '', mixed $page = 1): mixed#

A sitemap's address (get_sitemap_url): the index, or a provider's page of a subtype; false for one that is not there.

staticcanonical(): void#

The canonical step: a sitemap asked for by another address is sent to its own.

staticserve(Minn\Objects\SitemapServer $server): void#

What the sitemaps server does with the request (render_sitemaps).

Internals 2

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

privatepage(Minn\Objects\SitemapServer $server, string $sitemap, string $subtype): void#

One provider's page: printed, or a 404 when it has nothing (a subtype not the provider's gives nothing).

privatenotFound(): void#

The main query made a 404, which the theme renders.