PHP code example of horat1us / yii2-environment-config

1. Go to this page and download the library: Download horat1us/yii2-environment-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/ */

    

horat1us / yii2-environment-config example snippets




use Horat1us\Environment;

class Config extends Environment\Yii2\Config {
    // implement your methods (getters) here
}

// using constructor
$config = new Config([
    'keyPrefix' => 'SOME_PREFIX_',
]);

// or using container
\Yii::$container->get(Config::class, [], [
    'keyPrefix' => 'SOME_PREFIX_',
]);