You are here

public function Rss::getDescription in Zircon Profile 8

Same name in this branch
  1. 8 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getDescription()
  2. 8 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::getDescription()
  3. 8 core/modules/views/src/Plugin/views/style/Rss.php \Drupal\views\Plugin\views\style\Rss::getDescription()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::getDescription()

Get the feed description

Return value

string|null

Overrides FeedInterface::getDescription

File

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

Class

Rss

Namespace

Zend\Feed\Reader\Feed

Code

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