PHP code example of tres-framework / config
1. Go to this page and download the library: Download tres-framework/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/ */
tres-framework / config example snippets
$config = new Config();
$config->addFromArray([
'cookie.lifetime_in_hours' => 48,
'database' => [
'mysql.host' => '127.0.0.1',
'mysql.user' => 'bob',
],
'deeply.nested.array.with.zero' => 0,
'deeply.nested.array.with.a.null' => null,
'deeply.nested.array.with.a.false' => false,
]);
$config->addFromFile(__DIR__.'/config/database.php');
echo 'Cookie lifetime: '.$config->get('cookie.lifetime_in_hours');