/** * Create an HTML representation of the DOM, for debugging purposes * @param bool|false $bReturnRes Echoes or returns the HTML representation * @return mixed void or the HTML representation of the DOM */ public function Dump($bReturnRes = false) { $oDoc = new ModuleDesign(); $oClone = $oDoc->importNode($this->cloneNode(true), true); $oDoc->appendChild($oClone); $sXml = $oDoc->saveXML($oClone); if ($bReturnRes) { return $sXml; } else { echo "<pre>\n"; echo htmlentities($sXml); echo "</pre>\n"; } }