PHP code example of struktal / struktal-config

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

    

struktal / struktal-config example snippets


\struktal\Config\Config::setConfigDirectory("path/to/your/config.json");

$config = new \struktal\Config\Config();
$configVar = $config->get("configVar");
$nestedConfigVar = $config->get("nested", "configVar");
$defaultConfigVar = $config->getDefault(42, "defaultConfigVar");