Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
Programie edited this page Dec 16, 2014 · 1 revision

Load configuration and read values

usecom\selfcoders\jsonconfig\Config;
$config = newConfig("/path/to/your/config.json", "/path/to/your/template.json");
$config->getValue("path.to.your.config.value");// Will return the value (if defined in config.json) or the default value from the template

Saving configuration

usecom\selfcoders\jsonconfig\Config;
$config = newConfig("/path/to/your/config.json", "/path/to/your/template.json");
$config->setValue("path.to.your.config.value", "the new value");// This will set the value to "the new value"$config->save();// Make sure to save the file

Clone this wiki locally