You are here

public function Rss::getCommentCount in Zircon Profile 8.0

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

Get the number of comments/replies for current entry

Return value

string|null

Overrides EntryInterface::getCommentCount

File

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

Class

Rss

Namespace

Zend\Feed\Reader\Entry

Code

public function getCommentCount() {
  if (array_key_exists('commentcount', $this->data)) {
    return $this->data['commentcount'];
  }
  $commentcount = $this
    ->getExtension('Slash')
    ->getCommentCount();
  if (!$commentcount) {
    $commentcount = $this
      ->getExtension('Thread')
      ->getCommentCount();
  }
  if (!$commentcount) {
    $commentcount = $this
      ->getExtension('Atom')
      ->getCommentCount();
  }
  if (!$commentcount) {
    $commentcount = null;
  }
  $this->data['commentcount'] = $commentcount;
  return $this->data['commentcount'];
}