You are here

public function AbstractFeed::__construct in Zircon Profile 8

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

Constructor

Parameters

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

string $type Feed type:

File

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

Class

AbstractFeed

Namespace

Zend\Feed\Reader

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::detectType($this->domDocument);
  }
  $this
    ->registerNamespaces();
  $this
    ->indexEntries();
  $this
    ->loadExtensions();
}