LinkResponse
in package
Represents a hypermedia link in Horizon API responses
Links are used throughout Horizon responses to provide navigation between related resources following the HAL specification. Contains the href URL and whether it requires template expansion.
Tags
Table of Contents
Methods
- fromJson() : LinkResponse
- getHref() : string
- Gets the link href URL
- isTemplated() : bool
- Checks if the link is templated
- loadFromJson() : void
Methods
fromJson()
public
static fromJson(array<string|int, mixed> $json) : LinkResponse
Parameters
- $json : array<string|int, mixed>
Return values
LinkResponsegetHref()
Gets the link href URL
public
getHref() : string
Return values
string —The URL to the linked resource
isTemplated()
Checks if the link is templated
public
isTemplated() : bool
Return values
bool —True if the href contains URI template variables
loadFromJson()
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>