PHP code example of minphp / configure

1. Go to this page and download the library: Download minphp/configure 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/ */

    

minphp / configure example snippets



use Minphp\Configure\Configure;

$config = new Configure();
$config->set('key', 'value');
$config->get('key');


return array(
    'key1' => 'value',
    'key2' => array('key' => 'value')
);



use Minphp\Configure\Configure;

$config = new Configure();
$config->load(new Reader\PhpReader(new \SplFileObject('config.php')));
echo $config->get('key1'); // prints "value"
echo $config->get('key2')['key']; // prints "value";

$config->load(new Reader\JsonReader(new \SplFileObject('config.json')));

echo $config->get('key1'); // prints "value"
echo $config->get('key2')->property; // prints "value";

return array(
    'key' => 'value',
    'key2' => (object)array('key' => 'value')
);
$config->set($key, $value)
$config->get($key)
$config->exists($key)
$config->remove($key)