public function __construct($aRootDirs, $aRootNodeExtensions = array()) { $this->aDict = array(); $this->aDictKeys = array(); $this->aRootDirs = $aRootDirs; $this->oDOMDocument = new MFDocument(); $this->oRoot = $this->oDOMDocument->CreateElement('itop_design'); $this->oRoot->setAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance"); $this->oRoot->setAttribute('version', ITOP_DESIGN_LATEST_VERSION); $this->oDOMDocument->AppendChild($this->oRoot); $this->oModules = $this->oDOMDocument->CreateElement('loaded_modules'); $this->oRoot->AppendChild($this->oModules); $this->oClasses = $this->oDOMDocument->CreateElement('classes'); $this->oRoot->AppendChild($this->oClasses); $this->oDictionaries = $this->oDOMDocument->CreateElement('dictionaries'); $this->oRoot->AppendChild($this->oDictionaries); foreach (self::$aWellKnownParents as $sWellKnownParent) { $this->AddWellKnownParent($sWellKnownParent); } $this->oMenus = $this->oDOMDocument->CreateElement('menus'); $this->oRoot->AppendChild($this->oMenus); $this->oMeta = $this->oDOMDocument->CreateElement('meta'); $this->oRoot->AppendChild($this->oMeta); foreach ($aRootNodeExtensions as $sElementName) { $oElement = $this->oDOMDocument->CreateElement($sElementName); $this->oRoot->AppendChild($oElement); } self::$aLoadedModules = array(); self::$aLoadErrors = array(); libxml_use_internal_errors(true); }