You are here

public function Entry::setEncoding in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::setEncoding()
  2. 8.0 vendor/zendframework/zend-feed/src/Writer/Extension/ITunes/Entry.php \Zend\Feed\Writer\Extension\ITunes\Entry::setEncoding()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Writer/Entry.php \Zend\Feed\Writer\Entry::setEncoding()

Set the feed character encoding

Parameters

string $encoding:

Return value

Entry

Throws

Exception\InvalidArgumentException

File

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

Class

Entry

Namespace

Zend\Feed\Writer

Code

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