Links final class
Minn\Rest\Links · public/minn/src/Minn/Rest/Links.php · 83 lines
Response link relations compacted through CURIEs: a rel that matches a CURIE's template becomes `name:suffix`, and the used CURIEs ride along.
Used by 1
Public
| static | item(string $rel, string $href, array $attributes): array# | One link as a response serves it: its attributes, then its href; a self link's target hints after the href, where the reference adds them.
@return array<string, mixed> | ||||||
| static | expanded(array $links): array# | An answer's compact links as the reference keeps them on a response: each link under its full relation (a curie's short name expanded, the curies themselves dropped), with its href and its other attributes.
@return list<array{0: string, 1: string, 2: array<string, mixed>}> | ||||||
| static | compact(array $links, array $curies): array# | Links with their curies applied, as the reference compacts them.
@return array<string, mixed> |
Nothing matches.