You are here

public function Rss::getDescription in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getDescription()
  2. 8.0 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::getDescription()
  3. 8.0 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 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::getDescription()

Get the entry description

Return value

string

Overrides EntryInterface::getDescription

1 call to Rss::getDescription()
Rss::getContent in vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php
Get the entry content

File

vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php, line 243

Class

Rss

Namespace

Zend\Feed\Reader\Entry

Code

public function getDescription() {
  if (array_key_exists('description', $this->data)) {
    return $this->data['description'];
  }
  $description = null;
  if ($this
    ->getType() !== Reader\Reader::TYPE_RSS_10 && $this
    ->getType() !== Reader\Reader::TYPE_RSS_090) {
    $description = $this->xpath
      ->evaluate('string(' . $this->xpathQueryRss . '/description)');
  }
  else {
    $description = $this->xpath
      ->evaluate('string(' . $this->xpathQueryRdf . '/rss:description)');
  }
  if (!$description) {
    $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'];
}