You are here

public function Rss::getCommentLink in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getCommentLink()

Returns a URI pointing to the HTML page where comments can be made on this entry

Return value

string

Overrides EntryInterface::getCommentLink

File

vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php, line 525

Class

Rss

Namespace

Zend\Feed\Reader\Entry

Code

public function getCommentLink() {
  if (array_key_exists('commentlink', $this->data)) {
    return $this->data['commentlink'];
  }
  $commentlink = null;
  if ($this
    ->getType() !== Reader\Reader::TYPE_RSS_10 && $this
    ->getType() !== Reader\Reader::TYPE_RSS_090) {
    $commentlink = $this->xpath
      ->evaluate('string(' . $this->xpathQueryRss . '/comments)');
  }
  if (!$commentlink) {
    $commentlink = $this
      ->getExtension('Atom')
      ->getCommentLink();
  }
  if (!$commentlink) {
    $commentlink = null;
  }
  $this->data['commentlink'] = $commentlink;
  return $this->data['commentlink'];
}