PHP code example of fink / config

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

    

fink / config example snippets


use \Fink\config\Configuration;

// create a new instance
$config = new Configuration("config.json", Configuration::JSON);

// access a specific value
echo $config->get("section", "key"); // echoes "value"

use \Fink\config\Configuration;

// create a new instance
$jsonConfig = new Configuration("config.json");
$iniConfig = new Configuration("config.ini");

echo $jsonConfig->get("section", "key"); // echoes "value"
echo $iniConfig->get("section", "key");  // echoes "value", too

use \Fink\config\Configuration;

Configuration::addConfigurationLoader(42, YourCustomConfigurationLoader::class);

$config = new Configuration("your-custom-configuration-syntax.type", 42);