/** * Store changes to our asset's XML document * * @return void * @access private * @since 10/5/06 */ function _saveXml() { // printpre("<hr/><h2>Saving AssetXML for ".get_class($this)." ".$this->getId().": </h2>"); // HarmoniErrorHandler::printDebugBacktrace(); // print("<h3>Previous XML</h3>"); // $oldContent = $this->_asset->getContent(); // printpre(htmlentities($oldContent->asString())); // print("<h3>New XML</h3>"); $element = $this->getElement(); // printpre(htmlentities($element->ownerDocument->saveXMLWithWhitespace())); // exit; $this->_asset->updateContent(Blob::fromString($element->ownerDocument->saveXMLWithWhitespace())); $this->clearDomCache(); }
/** * Convert this object to a StorableBlob * * @return object * @access public * @since 6/9/06 */ function asABlob() { return Blob::fromString($this->asString()); }
/** * Store changes to our asset's XML document. This asset's 'element' * is actually in its parent component, so store the parent asset's xml. * * @return void * @access private * @since 10/5/06 */ function _saveXml() { // printpre("<hr/><h2>Saving Parent AssetXML for ".get_class($this)." ".$this->getId().": </h2>"); // print("<h3>Previous XML</h3>"); $parentComponent = $this->getParentComponent(); $parentAsset = $parentComponent->getAsset(); // $oldContent = $parentAsset->getContent(); // printpre(htmlentities($oldContent->asString())); // print("<h3>New XML</h3>"); $element = $this->getElement(); // printpre(htmlentities($element->ownerDocument->saveXMLWithWhitespace())); // exit; $parentAsset->updateContent(Blob::fromString($element->ownerDocument->saveXMLWithWhitespace())); }