Пример #1
0
 protected function CompileModuleDesigns($sTempTargetDir, $sFinalTargetDir)
 {
     SetupUtils::builddir($sTempTargetDir . '/core/module_designs');
     $oDesigns = $this->oFactory->GetNodes('/itop_design/module_designs/module_design');
     foreach ($oDesigns as $oDesign) {
         $oDoc = new ModuleDesign();
         $oClone = $oDoc->importNode($oDesign->cloneNode(true), true);
         $oDoc->appendChild($oClone);
         $oDoc->save($sTempTargetDir . '/core/module_designs/' . $oDesign->getAttribute('id') . '.xml');
     }
 }
 /**
  * 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";
     }
 }