LinkInterface
in
A readable link object.
Table of Contents
Methods
- getAttributes() : array<string|int, mixed>
- Returns a list of attributes that describe the target URI.
- getHref() : string
- Returns the target of the link.
- getRels() : array<string|int, string>
- Returns the relationship type(s) of the link.
- isTemplated() : bool
- Returns whether or not this is a templated link.
Methods
getAttributes()
Returns a list of attributes that describe the target URI.
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed> —A key-value list of attributes, where the key is a string and the value is either a PHP primitive or an array of PHP strings. If no values are found an empty array MUST be returned.
getHref()
Returns the target of the link.
public
getHref() : string
The target link must be one of:
- An absolute URI, as defined by RFC 5988.
- A relative URI, as defined by RFC 5988. The base of the relative link is assumed to be known based on context by the client.
- A URI template as defined by RFC 6570.
If a URI template is returned, isTemplated() MUST return True.
Return values
stringgetRels()
Returns the relationship type(s) of the link.
public
getRels() : array<string|int, string>
This method returns 0 or more relationship types for a link, expressed as an array of strings.
Return values
array<string|int, string>isTemplated()
Returns whether or not this is a templated link.
public
isTemplated() : bool
Return values
bool —True if this link object is templated, False otherwise.