You are here

public function Atom::getCommentCount in Zircon Profile 8.0

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

Get the number of comments/replies for current entry

Return value

int

Overrides EntryInterface::getCommentCount

File

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

Class

Atom

Namespace

Zend\Feed\Reader\Entry

Code

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