You are here

public function Entry::setCommentCount in Zircon Profile 8.0

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

Set the number of comments associated with this entry

Parameters

int $count:

Return value

Entry

Throws

Exception\InvalidArgumentException

File

vendor/zendframework/zend-feed/src/Writer/Entry.php, line 275

Class

Entry

Namespace

Zend\Feed\Writer

Code

public function setCommentCount($count) {
  if (!is_numeric($count) || (int) $count != $count || (int) $count < 0) {
    throw new Exception\InvalidArgumentException('Invalid parameter: "count" must be a positive integer number or zero');
  }
  $this->data['commentCount'] = (int) $count;
  return $this;
}