You are here

public function Feed::getCopyright in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getCopyright()
  2. 8.0 vendor/zendframework/zend-feed/src/Reader/Extension/DublinCore/Feed.php \Zend\Feed\Reader\Extension\DublinCore\Feed::getCopyright()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php \Zend\Feed\Reader\Extension\Atom\Feed::getCopyright()

Get the copyright entry

Return value

string|null

File

vendor/zendframework/zend-feed/src/Reader/Extension/Atom/Feed.php, line 80

Class

Feed

Namespace

Zend\Feed\Reader\Extension\Atom

Code

public function getCopyright() {
  if (array_key_exists('copyright', $this->data)) {
    return $this->data['copyright'];
  }
  $copyright = null;
  if ($this
    ->getType() === Reader\Reader::TYPE_ATOM_03) {
    $copyright = $this->xpath
      ->evaluate('string(' . $this
      ->getXpathPrefix() . '/atom:copyright)');
  }
  else {
    $copyright = $this->xpath
      ->evaluate('string(' . $this
      ->getXpathPrefix() . '/atom:rights)');
  }
  if (!$copyright) {
    $copyright = null;
  }
  $this->data['copyright'] = $copyright;
  return $this->data['copyright'];
}