getType()) == 'atom') { return; } $this->_setContent($this->_dom, $this->_base); if ($this->_called) { $this->_appendNamespaces(); } } /** * Append namespaces to root element * * @return void */ protected function _appendNamespaces() { $this->getRootElement()->setAttribute('xmlns:content', 'http://purl.org/rss/1.0/modules/content/'); } /** * Set entry content * * @param DOMDocument $dom * @param DOMElement $root * @return void */ protected function _setContent(DOMDocument $dom, DOMElement $root) { $content = $this->getDataContainer()->getContent(); if (!$content) { return; } $element = $dom->createElement('content:encoded'); $root->appendChild($element); $cdata = $dom->createCDATASection($content); $element->appendChild($cdata); $this->_called = true; } }