You are here

public function Atom::render in Zircon Profile 8

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

Render atom entry

Return value

Atom

File

vendor/zendframework/zend-feed/src/Writer/Renderer/Entry/Atom.php, line 37

Class

Atom

Namespace

Zend\Feed\Writer\Renderer\Entry

Code

public function render() {
  $this->dom = new DOMDocument('1.0', $this->container
    ->getEncoding());
  $this->dom->formatOutput = true;
  $entry = $this->dom
    ->createElementNS(Writer\Writer::NAMESPACE_ATOM_10, 'entry');
  $this->dom
    ->appendChild($entry);
  $this
    ->_setSource($this->dom, $entry);
  $this
    ->_setTitle($this->dom, $entry);
  $this
    ->_setDescription($this->dom, $entry);
  $this
    ->_setDateCreated($this->dom, $entry);
  $this
    ->_setDateModified($this->dom, $entry);
  $this
    ->_setLink($this->dom, $entry);
  $this
    ->_setId($this->dom, $entry);
  $this
    ->_setAuthors($this->dom, $entry);
  $this
    ->_setEnclosure($this->dom, $entry);
  $this
    ->_setContent($this->dom, $entry);
  $this
    ->_setCategories($this->dom, $entry);
  foreach ($this->extensions as $ext) {
    $ext
      ->setType($this
      ->getType());
    $ext
      ->setRootElement($this
      ->getRootElement());
    $ext
      ->setDOMDocument($this
      ->getDOMDocument(), $entry);
    $ext
      ->render();
  }
  return $this;
}