Ocs-server/Gfx4/Editing config files programmatically

GFX provides a handy class that lets you edit config files programmatically to create easy admin modes and settings managers.

All changes are made in ram before being saved to disk with the save() method. Remember to call save(), or your changes will be lost at the end of object's life.

//constructor, $namefile can be empty
$config = new EConfigFile($namefile);
//set $key with $value
$config->set($key, $value);
//get $value associated to $key
//delete $key from config file
//apply modifications, save

This page was last edited on 5 May 2016, at 15:48. Content is available under Creative Commons License SA 4.0 unless otherwise noted.