You are here

public function Rss::getCopyright in Zircon Profile 8

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

Get the copyright entry

Return value

string|null

Overrides FeedInterface::getCopyright

File

vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php, line 143

Class

Rss

Namespace

Zend\Feed\Reader\Feed

Code

public function getCopyright() {
  if (array_key_exists('copyright', $this->data)) {
    return $this->data['copyright'];
  }
  $copyright = null;
  if ($this
    ->getType() !== Reader\Reader::TYPE_RSS_10 && $this
    ->getType() !== Reader\Reader::TYPE_RSS_090) {
    $copyright = $this->xpath
      ->evaluate('string(/rss/channel/copyright)');
  }
  if (!$copyright && $this
    ->getExtension('DublinCore') !== null) {
    $copyright = $this
      ->getExtension('DublinCore')
      ->getCopyright();
  }
  if (empty($copyright)) {
    $copyright = $this
      ->getExtension('Atom')
      ->getCopyright();
  }
  if (!$copyright) {
    $copyright = null;
  }
  $this->data['copyright'] = $copyright;
  return $this->data['copyright'];
}