SingleAddresses final readonly class
Minn\Front\SingleAddresses · public/minn/src/Minn/Front/SingleAddresses.php · 67 lines
The addresses a single answers to besides its own, as the reference treats them: a slug the post used to have (alone, with a page number, or with an embed or trackback suffix), and an address that puts it under a category it is not in.
Constants and properties
| private | readonly Minn\Db $db | Promoted from the constructor. |
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
Public
| new | __construct(Minn\Db $db, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks)# | ||||
| method | formerSlug(string $slug, int $paged = 1): ?Minn\Front\Resolution# | A slug a post used to have redirects to where the post lives now, keeping the page number and dropping the query string; the lookup ignores status because the reference does (unreadable posts land on their `?p=` form and answer 404 there). | |||
| method | misplaced(Minn\Content\PostRecord $post, array $vars): bool# | Whether a post was asked for under a category it is not in, where the structure names the category: the category the address names is none at that path, or not one of the post's. The reference finds the post by its name whatever the category, then moves to its own address (a post in two categories answers under either).
| |||
| method | formerSuffix(Minn\Front\Resolution $redirect, string $suffix): Minn\Front\Resolution# | A former slug asked for with a suffix: embed follows the post to its new embed address, trackback goes to the post itself. The front page's redirect to the root keeps its own handling. |
Nothing matches.