/**
* Method to add a link to the feed entry object.
*
* @param FeedLink $link The link object to add.
*
* @return FeedEntry
*
* @since 3.1.4
*/
public function addLink(FeedLink $link)
{
// If the new link already exists then there is nothing to do, so just return.
foreach ($this->properties['links'] as $l) {
if ($l == $link) {
return $this;
}
}
// Add the new link.
$this->properties['links'][] = $link;
return $this;
}