/** * Get DOM node */ public function getNode($document) { $entry = $document->createElement('entry'); $entry->appendChild(AtomFeed::getTextNode($document, 'title', $this->title)); $entry->appendChild(AtomFeed::getTextNode($document, 'id', $this->id)); $entry->appendChild(AtomFeed::getDateNode($document, 'updated', $this->updated)); if ($this->summary !== null) { $entry->appendChild(AtomFeed::getCDATANode($document, 'summary', $this->summary)); } if ($this->link !== null) { $entry->appendChild($this->link->getNode($document)); } if ($this->published !== null) { $entry->appendChild(AtomFeed::getDateNode($document, 'published', $this->published)); } if ($this->contributor !== null) { $entry->appendChild($this->contributor->getNode($document)); } // add authors foreach ($this->authors as $author) { $entry->appendChild($author->getNode($document)); } if ($this->content !== null) { $entry->appendChild(AtomFeed::getCDATANode($document, 'content', $this->content)); } return $entry; }