You are here

public function AbstractFeed::setLanguage in Zircon Profile 8

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

Set the feed language

Parameters

string $language:

Return value

AbstractFeed

Throws

Exception\InvalidArgumentException

File

vendor/zendframework/zend-feed/src/Writer/AbstractFeed.php, line 340

Class

AbstractFeed

Namespace

Zend\Feed\Writer

Code

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