PHP code example of brightnucleus / config-52
1. Go to this page and download the library: Download brightnucleus/config-52 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/ */
brightnucleus / config-52 example snippets
use BrightNucleus_ConfigInterface as ConfigInterface;
use BrightNucleus_Config as Config;
class WorldGreeter {
/** @var @var ConfigInterface */
protected $config;
public function __construct(ConfigInterface $config) {
$this->config = $config;
}
public function greet() {
$hello = $this->config->getKey('hello');
$world = $this->config->getKey('world');
echo "$hello $world";
}
}
$config_file = dirname(__FILE__) . '/config/greetings.php';
$config = new Config(