My name is PHP Configurator and I can help you to manage your configuration files into your PHP projects.
All your projects have some configurations settings which you can save on database or save under files in format PHP, ini, yaml, xml, etc.
You know, the most fast way is using PHP array, but give your customers a PHP array file can be hard to edit.
They need FTP program, an editor and know what to change. Without considering that they can wrong edit that files.
Thanks to me, you can just create your PHP array organized into files, and I will create a nice user interface where your customers can easy edit your settings.
I work with any PHP array, but I have two basic modes: simple PHP associative array like array(‘key1’ => ‘value1’, ‘key2’ => ‘value2’) and an advanced mode, where you can define attributes like field type, validation, etc.
How does it work?
It’s pretty simple. Find below example of usage, then you can also check example demos here, here and here.
// 1. Include main class
// 2. Prepare Settings
$settings = [
'base_dir' => '/path/to/www/envato/configurator' // base path to your project
,'config_dir' => '/config/' // config directory where you put your config files
,'form_field_prefix' => '<div class="form-group">' // Each form field will have this prefix
,'form_field_suffix' => '</div>' // Each form field will have this suffix
,'form_field_class' => 'form-control' // Form field class name
// 3. Create new instance passing $settings array
$configurator = new Configurator($settings);
// 4. Set configuration file (optional, if omitted, config.php will be used)
// The path of file is build using $settings['base_dir'] + $settings['config_dir'] + 'config' + '.php'
// 'config' is below paramter which you go to set
// 5. Set language file (optional if you want translate label and description)
// The language file should be an associative array
// 6. Load data from file
$configData = $configurator->loadFile();
// 7. Set current config so we can add/edit config
// 8. Check if post is submitted
// 9. Save
// display form with data of configuration file
NOTE: I have use this product in different PHP projects in last years, so it can consider stable version. However all software has bugs, and if you discover one, please let me know. I will do my best to fix them in later releases.