EvolvableLinkProviderInterface
extends
LinkProviderInterface
in
An evolvable link provider value object.
Table of Contents
Methods
- getLinks() : iterable<string|int, LinkInterface>
- Returns an iterable of LinkInterface objects.
- getLinksByRel() : iterable<string|int, LinkInterface>
- 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() : iterable<string|int, LinkInterface>
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
iterable<string|int, LinkInterface>getLinksByRel()
Returns an iterable of LinkInterface objects that have a specific relationship.
public
getLinksByRel(string $rel) : iterable<string|int, LinkInterface>
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 : string
-
The relationship name for which to retrieve links.
Return values
iterable<string|int, LinkInterface>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
staticwithoutLink()
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.