PHP code example of jenner / config

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

    

jenner / config example snippets


use Sinergi\Config\Config;

$config = new Config(__DIR__ . "/configs");

$config->setEnvironment('prod');

$config->get('app.timezone');

$config->get('app.timezone');

$config->get('app.timezone', "America/New_York");

$config->get('database.connections.default.host');

$config->set('app.timezone', "Europe/Berlin");

$config->set('database', [
    'host' => "localhost",
    'dbname' => "my_database",
    'user' => "my_user",
    'password' => "my_password"
]);

return [
    'timezone' => "America/New_York"
];