EvolvableLinkProviderInterface
extends
LinkProviderInterface
in
An evolvable link provider value object.
Table of Contents
- getLinks() : array<string|int, LinkInterface>|Traversable
- Returns an iterable of LinkInterface objects.
- getLinksByRel() : array<string|int, LinkInterface>|Traversable
- Returns an iterable of LinkInterface objects that have a specific relationship.
- withLink() : static
- Returns an instance with the specified link included.
- withoutLink() : static
- Returns an instance with the specifed link removed.
Methods
getLinks()
Returns an iterable of LinkInterface objects.
public
getLinks() : array<string|int, LinkInterface>|Traversable
The iterable may be an array or any PHP \Traversable object. If no links are available, an empty array or \Traversable MUST be returned.
Return values
array<string|int, LinkInterface>|Traversable —getLinksByRel()
Returns an iterable of LinkInterface objects that have a specific relationship.
public
getLinksByRel(mixed $rel) : array<string|int, LinkInterface>|Traversable
The iterable may be an array or any PHP \Traversable object. If no links with that relationship are available, an empty array or \Traversable MUST be returned.
Parameters
- $rel : mixed
Return values
array<string|int, LinkInterface>|Traversable —withLink()
Returns an instance with the specified link included.
public
withLink(LinkInterface $link) : static
If the specified link is already present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Parameters
- $link : LinkInterface
-
A link object that should be included in this collection.
Return values
static —withoutLink()
Returns an instance with the specifed link removed.
public
withoutLink(LinkInterface $link) : static
If the specified link is not present, this method MUST return normally without errors. The link is present if $link is === identical to a link object already in the collection.
Parameters
- $link : LinkInterface
-
The link to remove.