PHP code example of affinity4 / config
1. Go to this page and download the library: Download affinity4/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/ */
affinity4 / config example snippets
$loader = new Affinity4\Config\Loader\Yaml(__DIR__ . '/config.yml');
$config = new Affinity4\Config\Config($loader);
$config->get();
[
'env' => 'local',
'db' => [
'local' => [
'name' => 'test',
'user' => 'root',
'pass' => 'root',
'host' => '127.0.0.1',
]
]
]
$config->get('db local name'); // test