Method | Description | |
---|---|---|
addLink ( string $rel, |
Add a single link to the links collection | |
addLinks ( string $rel, array $links, boolean $overwrite = true ) : boolean | Add multiple links to the links collection | |
getLinks ( string $rel = null ) : array | |
Returns the collection of links |
public addLink ( string $rel, |
||
$rel | string | The relation of the link to the document. See RFC 5988 http://tools.ietf.org/html/rfc5988#section-6.2.2 A document MUST always have a "self" link. |
$link | The actual link object | |
$overwrite | boolean | When false and a link of $rel relation exists, an array of links is created. Otherwise the existing link is overwriten with the new one |
return | boolean | True if the link was added to the collection |
public addLinks ( string $rel, array $links, boolean $overwrite = true ) : boolean | ||
$rel | string | The relation of the links to the document. See RFC 5988. |
$links | array | An array of FOFHalLink objects |
$overwrite | boolean | When false and a link of $rel relation exists, an array of links is created. Otherwise the existing link is overwriten with the new one |
return | boolean | True if the link was added to the collection |