API / Minn\Front / FrontController

FrontController final readonly class

Minn\Front\FrontController · public/minn/src/Minn/Front/FrontController.php · 105 lines

The public site. One catch-all route: resolve the URL, then either redirect or render, through the active block theme when there is one, the classic PHP template runner when the theme is classic, and the interim template otherwise.

Used by 1

Constants and properties

privatereadonly Minn\Front\Resolver $resolver

Promoted from the constructor.

privatereadonly Minn\Theme\MainQueryBridge $bridge

Promoted from the constructor.

privatereadonly Minn\Front\Renderer $renderer

Promoted from the constructor.

privatereadonly ?Minn\Theme\PageRenderer $theme

Promoted from the constructor.

privatereadonly ?Minn\Front\FeedController $feeds

Promoted from the constructor.

privatereadonly ?Minn\Cron\Cron $cron

Promoted from the constructor.

privatereadonly ?Minn\Theme\ClassicRenderer $classic

Promoted from the constructor.

privatereadonly ?Minn\Front\SitemapController $sitemaps

Promoted from the constructor.

privatereadonly ?Minn\Theme\EmbedRenderer $embeds

Promoted from the constructor.

Public

new__construct(Minn\Front\Resolver $resolver, Minn\Theme\MainQueryBridge $bridge, Minn\Front\Renderer $renderer, ?Minn\Theme\PageRenderer $theme = NULL, ?Minn\Front\FeedController $feeds = NULL, ?Minn\Cron\Cron $cron = NULL, ?Minn\Theme\ClassicRenderer $classic = NULL, ?Minn\Front\SitemapController $sitemaps = NULL, ?Minn\Theme\EmbedRenderer $embeds = NULL)#
methodnotFound(): Minn\Http\Response#

The themed (or interim) 404 page.

methodthemed(Minn\Front\Resolution $resolution): Minn\Http\Response#

The themed (or interim) page for a resolution, under its status: the main query stood first, its 404 (an empty page past the first, an empty date) taken as the page's.

methodshow(Minn\Http\Request $request): Minn\Http\Response* /{path*} (public)#

The public page for any path; when scheduled work is due, the run follows the response.

Internals 2

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

privatepage(Minn\Http\Request $request): Minn\Http\Response#
privaterendered(Minn\Http\Request $request, Minn\Front\Resolution $resolution): Minn\Http\Response#

The page for a resolution: an embed, a sitemap's or feed's query form, else the theme's.