Parts final class
Minn\Feed\Parts · public/minn/src/Minn/Feed/Parts.php · 140 lines
The repeating parts of a feed element read out of the tree as raw values: links by relation, categories, and enclosures (Media RSS contents, Atom enclosure links, RSS enclosures). The feed object sanitizes and wraps them; each raw value travels with the node it came from, so a relative URL resolves against that node's base.
Constants and properties
| const | IANA = 'http://www.iana.org/assignments/relation/' | |
| const | MEDIA = 'http://search.yahoo.com/mrss/' | |
| private | DC = array ( 0 => 'http://purl.org/dc/elements/1.1/', 1 => 'http://purl.org/dc/elements/1.0/', ) |
Public
| static | links(array $child, array $plain, array $more, Closure $iri): array# | Links by relation: Atom links (rel defaults to alternate, IANA names answer to both spellings), then the RSS-style link elements and the given extra alternates.
@return array<string, list<string>> | ||||||||||||
| static | categories(array $child): array# | Categories as raw text: Atom (term, scheme, label), RSS 2.0 (the text, the domain as scheme), Dublin Core subjects.
@return list<array{term: ?string, scheme: ?string, label: ?string, type: string}> | ||||||||||||
| static | enclosures(array $item): array# | An item's enclosures as raw fields, Media RSS contents first (with the item's thumbnails when a content has none of its own), then Atom enclosure links, then RSS enclosures. "node" is where the URL came from.
@return list<array<string, mixed>> | ||||||||||||
| static | thumbnails(array $node): array# | The media:thumbnail URLs directly under an element, each with its node.
@return list<array{0: string, 1: array<string, mixed>}> |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | media(array $node, array $thumbnails): array# |
@return array<string, mixed> |
Nothing matches.