API / Minn\Theme / FeedHeaders

FeedHeaders final class

Minn\Theme\FeedHeaders · public/minn/src/Minn/Theme/FeedHeaders.php · 50 lines

The headers a feed is sent with, as the reference's send_headers sends them (suite feed-hooks): the feed type's content type, and when the site last changed (its posts, and its comments too for a comments feed) as Last-Modified with an ETag over it; a reader whose copy carries that date or tag is told the copy is current.

Constants and properties

privateFORMAT = 'D, d M Y H:i:s'

Public

staticfor(array $vars, ?Minn\Http\Request $request): array#

The headers, and whether the reader's copy is current.

$varsarray<string, mixed>the request's query variables
@return array{0: array<string, string>, 1: bool}

Internals 1

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

privatecarriesComments(array $vars, string $feed): bool#
$varsarray<string, mixed>whether the feed's last change counts the comments: a comments feed, or a single post's