You are here

public function Entry::setId in Zircon Profile 8

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

Set the feed ID

Parameters

string $id:

Return value

Entry

Throws

Exception\InvalidArgumentException

File

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

Class

Entry

Namespace

Zend\Feed\Writer

Code

public function setId($id) {
  if (empty($id) || !is_string($id)) {
    throw new Exception\InvalidArgumentException('Invalid parameter: parameter must be a non-empty string');
  }
  $this->data['id'] = $id;
  return $this;
}