Exemplo n.º 1
0
 /**
  * Used to set config absolute file path.
  * Leave constructor empty and use this.
  */
 public function set_abs_file($filename)
 {
     $this->name = $filename;
     if (!file_exists($this->name)) {
         ELog::error('Config file not existent: ' . $this->name);
     } else {
         $this->data = EConfig::parse_file($this->name);
     }
 }
Exemplo n.º 2
0
 public static function load_all()
 {
     EConfig::$data = array();
     //enters in conf directory
     chdir(ELoader::$config_path);
     //parse every single conf file and place it in an associative array
     foreach (glob("*") as $filename) {
         $name = EFileSystem::get_file_name($filename);
         EConfig::$data[$name] = EConfig::parse_file($filename);
     }
 }