config= parse_ini_file($file, TRUE); $ret= preg_replace( array('/^.*\nWarning: /', '/\n.*$/'), array('', ''), ob_get_contents()); ob_end_clean(); /* Bail out in case of errors */ if ($ret != ""){ throw new ConfigManagerException($ret); } #echo "Test config and load additional configuration data from LDAP\n"; #$this->test_config(); #$this->load_servers(); -> Section servers/...; #$this->load_plugin_configs(); -> Section pugins/name/value; #print_r($this->config); } public function save($file){ throw new ConfigManagerException(_("Save not supported yet!")); } public function setSection($name){ if (isset($this->config[$name])){ $this->section= $name; $this->current= &$this->config[$name]; return TRUE; } else { $this->section= ""; $this->current= NULL; return FALSE; } } public function getSection(){ return $this->section; } public function getSections(){ } public function getValue($name){ if (!$this->current){ throw new ConfigManagerException(_("Can't get value without current section set!")); } if (isset($this->current[$name])){ return $this->current[$name]; } else { return NULL; } } public function setValue($section, $value){ } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>