API / Minn\Feed / Locator

Locator final class

Minn\Feed\Locator · public/minn/src/Minn/Feed/Locator.php · 54 lines

Feed autodiscovery: the feeds an HTML page names in its <link rel="alternate"> elements with a feed type, in page order, each resolved against the page (or its <base href>).

Uses 1

Constants and properties

privateTYPES = array ( 0 => 'application/rss+xml', 1 => 'application/atom+xml', 2 => 'application/rdf+xml', 3 => 'application/xml', 4 => 'text/xml', )

Public

staticlooksLikeFeed(string $body, string $contentType): bool#

Whether a response looks like a feed document rather than a page or text.

staticalternates(string $html, string $pageUrl): array#

The feed URLs a page names, resolved, in page order, each once.

@return list<string>

Internals 1

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

privateattributes(string $raw): array#
@return array<string, string>