1. Go to this page and download the library: Download jenson/convict library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jenson / convict example snippets
$scheme = '{
"about": "Special keyword containing a short description of the program",
"key": {
"to": {
"value": {
"doc": "A value that we can set and get",
"format": "*",
"arg": "value",
"shortarg": "v",
"env": "PHP_VALUE",
"default": "foo bar"
}
}
}
}';
$config = new \Convict\Convict($scheme);
$config->validate();
$config->set('key.to.value', 'a value');
$config->get('key.to.value');
$config->get('key');