示例#1
0
 /**
  * Loads the valid configuration definitions from the mapcfg files.
  * Those files define the options which are available for the different
  * object types. The Infos fetched from these files contain all data about
  * the options like variable format, validation regexes and so on.
  */
 private function fetchValidConfig()
 {
     global $CORE;
     self::$validConfig = array();
     // Holds all registered config vars
     $mapConfigVars = array();
     // Maps the config vars to the object types
     $mapConfigVarMap = array();
     $path = cfg('paths', 'server') . '/mapcfg';
     $files = $CORE->listDirectory($path, MATCH_PHP_FILE);
     foreach ($files as $f) {
         include_once realpath($path . '/' . $f);
     }
     // Now register the variables for the object types
     $this->registerConfigVars($mapConfigVars, $mapConfigVarMap);
 }