You are here

public function Atom::__construct in Zircon Profile 8

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

Constructor

Parameters

DOMDocument $dom:

string $type:

Overrides AbstractFeed::__construct

File

vendor/zendframework/zend-feed/src/Reader/Feed/Atom.php, line 25

Class

Atom

Namespace

Zend\Feed\Reader\Feed

Code

public function __construct(DOMDocument $dom, $type = null) {
  parent::__construct($dom, $type);
  $manager = Reader\Reader::getExtensionManager();
  $atomFeed = $manager
    ->get('Atom\\Feed');
  $atomFeed
    ->setDomDocument($dom);
  $atomFeed
    ->setType($this->data['type']);
  $atomFeed
    ->setXpath($this->xpath);
  $this->extensions['Atom\\Feed'] = $atomFeed;
  $atomFeed = $manager
    ->get('DublinCore\\Feed');
  $atomFeed
    ->setDomDocument($dom);
  $atomFeed
    ->setType($this->data['type']);
  $atomFeed
    ->setXpath($this->xpath);
  $this->extensions['DublinCore\\Feed'] = $atomFeed;
  foreach ($this->extensions as $extension) {
    $extension
      ->setXpathPrefix('/atom:feed');
  }
}