You are here

public function Entry::getCommentLink in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::getCommentLink()
  2. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getCommentLink()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getCommentLink()

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

Return value

string

File

vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php, line 432

Class

Entry

Namespace

Zend\Feed\Reader\Extension\Atom

Code

public function getCommentLink() {
  if (array_key_exists('commentlink', $this->data)) {
    return $this->data['commentlink'];
  }
  $link = null;
  $list = $this
    ->getXpath()
    ->query($this
    ->getXpathPrefix() . '//atom:link[@rel="replies" and @type="text/html"]/@href');
  if ($list->length) {
    $link = $list
      ->item(0)->value;
    $link = $this
      ->absolutiseUri($link);
  }
  $this->data['commentlink'] = $link;
  return $this->data['commentlink'];
}