You are here

public function AbstractFeed::setLink in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Writer/AbstractFeed.php \Zend\Feed\Writer\AbstractFeed::setLink()

Set a link to the HTML source

Parameters

string $link:

Return value

AbstractFeed

Throws

Exception\InvalidArgumentException

File

vendor/zendframework/zend-feed/src/Writer/AbstractFeed.php, line 357

Class

AbstractFeed

Namespace

Zend\Feed\Writer

Code

public function setLink($link) {
  if (empty($link) || !is_string($link) || !Uri::factory($link)
    ->isValid()) {
    throw new Exception\InvalidArgumentException('Invalid parameter: parameter must be a non-empty string and valid URI/IRI');
  }
  $this->data['link'] = $link;
  return $this;
}