Resolution final readonly class
Minn\Front\Resolution · public/minn/src/Minn/Front/Resolution.php · 116 lines
The outcome of resolving a public URL: which kind of thing it names, the record behind it, the page number for paginated views, and the query vars of the rewrite rule the address matched (what the request parse hands plugins). Redirects carry their target instead.
Used by 24 (show)
Constants and properties
| prop | readonly Minn\Front\Kind $kind | Promoted from the constructor. |
| prop | readonly Minn\Content\PostRecord|Minn\Content\UserRecord|Minn\Content\TermRecord|array|null $record | Promoted from the constructor. |
| prop | readonly int $paged | Promoted from the constructor. |
| prop | readonly ?string $location | Promoted from the constructor. |
| prop | readonly int $status | Promoted from the constructor. |
| prop | readonly ?string $search | Promoted from the constructor. |
| prop | readonly ?array $date | Promoted from the constructor. |
| prop | readonly ?string $authorName | Promoted from the constructor. |
| prop | readonly bool $front | the static front page (show_on_front = page), rendered as a page that is also home Promoted from the constructor. |
| prop | readonly bool $preview | a preview: the reader's autosave replaces the stored content Promoted from the constructor. |
| prop | readonly bool $postsPage | the posts page (page_for_posts): the record is the page, the listing is the blog Promoted from the constructor. |
| prop | readonly array $vars | Promoted from the constructor. |
Public
| new | __construct(Minn\Front\Kind $kind, Minn\Content\PostRecord|Minn\Content\UserRecord|Minn\Content\TermRecord|array|null $record = NULL, int $paged = 1, ?string $location = NULL, int $status = 200, ?string $search = NULL, ?array $date = NULL, ?string $authorName = NULL, bool $front = false, bool $preview = false, bool $postsPage = false, array $vars = array ( ))# |
| ||||||
| method | asPreview(): self# | The same resolution marked as a preview. | ||||||
| method | withVars(array $vars): self# | The same resolution reached through a rule with these query vars. @param array<string, string> $vars
| ||||||
| static | home(int $paged = 1): self# | The home listing. | ||||||
| static | single(Minn\Content\PostRecord $post, int $paged = 1): self# | A single post or page. | ||||||
| static | frontPage(Minn\Content\PostRecord $page, int $paged = 1): self# | The static front page. | ||||||
| static | postsPage(Minn\Content\PostRecord $page, int $paged = 1): self# | The page that stands for the blog: a home listing whose record is the page. | ||||||
| static | term(string $taxonomy, Minn\Content\TermRecord $term, int $paged = 1): self# | A category or tag archive. | ||||||
| static | taxonomy(Minn\Content\TermRecord $term, int $paged = 1): self# | A plugin taxonomy's term archive; the record is the term row (with its taxonomy). | ||||||
| static | postTypeArchive(array $type, int $paged = 1): self# | A plugin post type's archive; the record is the registered type (name, label, ...). | ||||||
| static | author(string $name, ?Minn\Content\UserRecord $user, int $paged = 1): self# | An author archive. | ||||||
| static | date(int $year, ?int $month, ?int $day, int $paged = 1): self# | A date archive. | ||||||
| static | search(string $term, int $paged = 1): self# | A search. | ||||||
| static | notFound(): self# | A 404. | ||||||
| static | redirect(string $location, int $status = 301): self# | A redirect. | ||||||
| method | id(): int# | The record's id, post or term. |
Nothing matches.