1. Go to this page and download the library: Download jasny/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/ */
jasny / config example snippets
use Jasny\Config;
$config = (new Config())
->load('settings.yml')
->load('settings.dev.yml', ['optional' => true]);
use Symfony\Component\Yaml;
$parser = new class() extends Yaml\Parser() {
public function parse($value, $options = 0) {
return parent::parseFile($value, $options | Yaml\Yaml::PARSE_CONSTANT);
}
}
$yamlLoader = new YamlSymfonyLoader($options, $parser);