You are here

public function Rss::__construct 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::__construct()
  2. 8 vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php \Zend\Feed\Reader\Feed\Rss::__construct()
  3. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Rss.php \Zend\Feed\Writer\Renderer\Entry\Rss::__construct()
  4. 8 vendor/zendframework/zend-feed/src/Writer/Renderer/Feed/Rss.php \Zend\Feed\Writer\Renderer\Feed\Rss::__construct()
  5. 8 core/modules/node/src/Plugin/views/row/Rss.php \Drupal\node\Plugin\views\row\Rss::__construct()
Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/Entry/Rss.php \Zend\Feed\Reader\Entry\Rss::__construct()

Constructor

Parameters

DOMElement $entry:

string $entryKey:

string $type:

Overrides AbstractEntry::__construct

File

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

Class

Rss

Namespace

Zend\Feed\Reader\Entry

Code

public function __construct(DOMElement $entry, $entryKey, $type = null) {
  parent::__construct($entry, $entryKey, $type);
  $this->xpathQueryRss = '//item[' . ($this->entryKey + 1) . ']';
  $this->xpathQueryRdf = '//rss:item[' . ($this->entryKey + 1) . ']';
  $manager = Reader\Reader::getExtensionManager();
  $extensions = [
    'DublinCore\\Entry',
    'Content\\Entry',
    'Atom\\Entry',
    'WellFormedWeb\\Entry',
    'Slash\\Entry',
    'Thread\\Entry',
  ];
  foreach ($extensions as $name) {
    $extension = $manager
      ->get($name);
    $extension
      ->setEntryElement($entry);
    $extension
      ->setEntryKey($entryKey);
    $extension
      ->setType($type);
    $this->extensions[$name] = $extension;
  }
}