PHP code example of publishing-kit / config
1. Go to this page and download the library: Download publishing-kit/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/ */
publishing-kit / config example snippets
$config = PublishingKit\Config\Config::fromFile('config.php');
$multiConfig = PublishingKit\Config\Config::fromFiles([
'config.php',
'config.ini',
'config.yml'
]);
$config->has('foo'); // returns true
$config->get('foo'); // returns 'bar'
$config->foo; // returns 'bar'
php
$values = [
'foo' => 'bar'
];
$config = new PublishingKit\Config\Config($values);
echo $config->get('foo'); // returns 'bar'