Data = array(); } function ReadValue($Name) { if(!is_array($Name)) $Name = explode('/', $Name); $Last = array_pop($Name); $Data = &$this->Data; foreach($Name as $Item) { $Data = &$Data[$Item]; } return($Data[$Last]); } function WriteValue($Name, $Value) { if(!is_array($Name)) $Name = explode('/', $Name); $Last = array_pop($Name); $Data = &$this->Data; foreach($Name as $Item) { $Data = &$Data[$Item]; } $Data[$Item] = $Value; } function LoadFromFile($FileName) { $ConfigData = array(); include $FileName; foreach($this->Data as $Index => $Item) { if(array_key_exits($Index, $ConfigData)) $this->Data[$Index] = $ConfigData[$Index]; } } function SaveToFile($FileName) { file_put_contents($FileName, "Data, true).";\n"); } function GetAsArray() { return($this->Data); } }