1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
<?php
namespace Gedcomx\Links;
/**
* An interface declaring support for managing hypermedia links. Links are not specified by GEDCOM X core, but as
* extension elements by GEDCOM X RS.
* Interface SupportsLinks
*
* @package Gedcomx\Links
*/
interface SupportsLinks
{
/**
* Gets the array of hypermedia links.
*
* @return array
*/
public function getLinks();
/**
* Sets the array of hypermedia links.
*
* @param array $links
*/
public function setLinks(array $links);
/**
* Adds a hypermedia link to the current array of links.
*
* @param \Gedcomx\Links\Link $link
*/
public function addLink(Link $link);
/**
* Add a hypermedia link relationship
*
* @param string $rel see Gedcom\Rs\Client\Rel
* @param string $href The target URI.
*/
public function addLinkRelation($rel, $href);
/**
* Add a templated link.
*
* @param string $rel see Gedcom\Rs\Client\Rel
* @param string $template The link template.
*/
public function addTemplatedLink($rel, $template);
/**
* Get a link by its rel.
*
* @param string $rel see Gedcom\Rs\Client\Rel
*
* @return \Gedcomx\Links\Link
*/
public function getLink($rel);
/**
* Get a list of links by rel.
*
* @param string $rel see Gedcom\Rs\Client\Rel
*
* @return \Gedcomx\Links\Link[]
*/
public function getLinksByRel($rel);
}