public function Entry::getCommentFeedLink in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/WellFormedWeb/Entry.php \Zend\Feed\Reader\Extension\WellFormedWeb\Entry::getCommentFeedLink()
- 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getCommentFeedLink()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Entry.php \Zend\Feed\Reader\Extension\Atom\Entry::getCommentFeedLink()
Returns a URI pointing to a feed of all comments for this entry
Parameters
string $type:
Return value
string
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Extension/ Atom/ Entry.php, line 460
Class
Namespace
Zend\Feed\Reader\Extension\AtomCode
public function getCommentFeedLink($type = 'atom') {
if (array_key_exists('commentfeedlink', $this->data)) {
return $this->data['commentfeedlink'];
}
$link = null;
$list = $this
->getXpath()
->query($this
->getXpathPrefix() . '//atom:link[@rel="replies" and @type="application/' . $type . '+xml"]/@href');
if ($list->length) {
$link = $list
->item(0)->value;
$link = $this
->absolutiseUri($link);
}
$this->data['commentfeedlink'] = $link;
return $this->data['commentfeedlink'];
}