Class FOFHalLinks

Description

Implementation of the Hypertext Application Language links in PHP. This is actually a collection of links.

  • since: 2.1

Located in /libraries/fof/hal/links.php (line 17)


	
			
Method Summary
 boolean addLink (string $rel, FOFHalLink $link, [boolean $overwrite = true])
 boolean addLinks (string $rel, array $links, [boolean $overwrite = true])
 array|FOFHalLink getLinks ([string $rel = null])
Methods
addLink (line 39)

Add a single link to the links collection

  • return: True if the link was added to the collection
  • access: public
boolean addLink (string $rel, FOFHalLink $link, [boolean $overwrite = true])
  • string $rel: 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.
  • FOFHalLink $link: The actual link object
  • boolean $overwrite: 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
addLinks (line 76)

Add multiple links to the links collection

  • return: True if the link was added to the collection
  • access: public
boolean addLinks (string $rel, array $links, [boolean $overwrite = true])
  • string $rel: The relation of the links to the document. See RFC 5988.
  • array $links: An array of FOFHalLink objects
  • boolean $overwrite: 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
getLinks (line 99)

Returns the collection of links

  • access: public
array|FOFHalLink getLinks ([string $rel = null])
  • string $rel: Optional; the relation to return the links for

Documentation generated on Tue, 19 Nov 2013 15:07:10 +0100 by phpDocumentor 1.4.3