PHP code example of tutu-ru / lib-config

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

    

tutu-ru / lib-config example snippets


$config = new ConfigContainer();

$config->setConfig('app', new SomeAppConfig(), 0);
$config->setConfig('env', new SomeEnvConfig(), 1);

// опрос всех по приоритетам
$config->getValue('some.node');

// значение в конкретном конфиге
$config->getConfig('app')->getValue('some.node');
$config->getConfig('env')->getValue('some.node');