You are here

public function AbstractFeed::__construct in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-feed/src/Reader/AbstractFeed.php \Zend\Feed\Reader\AbstractFeed::__construct()
  2. 8.0 vendor/zendframework/zend-feed/src/Writer/AbstractFeed.php \Zend\Feed\Writer\AbstractFeed::__construct()
  3. 8.0 vendor/zendframework/zend-feed/src/Reader/Feed/AbstractFeed.php \Zend\Feed\Reader\Feed\AbstractFeed::__construct()
Same name and namespace in other branches
  1. 8 vendor/zendframework/zend-feed/src/Reader/Feed/AbstractFeed.php \Zend\Feed\Reader\Feed\AbstractFeed::__construct()

Constructor

Parameters

DOMDocument $domDocument The DOM object for the feed's XML:

string $type Feed type:

2 calls to AbstractFeed::__construct()
Atom::__construct in vendor/zendframework/zend-feed/src/Reader/Feed/Atom.php
Constructor
Rss::__construct in vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php
Constructor
2 methods override AbstractFeed::__construct()
Atom::__construct in vendor/zendframework/zend-feed/src/Reader/Feed/Atom.php
Constructor
Rss::__construct in vendor/zendframework/zend-feed/src/Reader/Feed/Rss.php
Constructor

File

vendor/zendframework/zend-feed/src/Reader/Feed/AbstractFeed.php, line 77

Class

AbstractFeed

Namespace

Zend\Feed\Reader\Feed

Code

public function __construct(DOMDocument $domDocument, $type = null) {
  $this->domDocument = $domDocument;
  $this->xpath = new DOMXPath($this->domDocument);
  if ($type !== null) {
    $this->data['type'] = $type;
  }
  else {
    $this->data['type'] = Reader\Reader::detectType($this->domDocument);
  }
  $this
    ->registerNamespaces();
  $this
    ->indexEntries();
  $this
    ->loadExtensions();
}