You are here

public function Atom::__construct in Zircon Profile 8.0

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

Constructor

Parameters

DOMElement $entry:

int $entryKey:

string $type:

Overrides AbstractEntry::__construct

File

vendor/zendframework/zend-feed/src/Reader/Entry/Atom.php, line 32

Class

Atom

Namespace

Zend\Feed\Reader\Entry

Code

public function __construct(DOMElement $entry, $entryKey, $type = null) {
  parent::__construct($entry, $entryKey, $type);

  // Everyone by now should know XPath indices start from 1 not 0
  $this->xpathQuery = '//atom:entry[' . ($this->entryKey + 1) . ']';
  $manager = Reader\Reader::getExtensionManager();
  $extensions = [
    'Atom\\Entry',
    'Thread\\Entry',
    'DublinCore\\Entry',
  ];
  foreach ($extensions as $name) {
    $extension = $manager
      ->get($name);
    $extension
      ->setEntryElement($entry);
    $extension
      ->setEntryKey($entryKey);
    $extension
      ->setType($type);
    $this->extensions[$name] = $extension;
  }
}