horat1us/yii2-environment-config

Yii2 environment-config integration

1.1.0 2019-11-27 09:28 UTC

This package is auto-updated.

Last update: 2024-12-16 03:58:41 UTC


README

Latest Stable Version Total Downloads Build Status codecov

Main purpose of this package is to integrate horat1us\environment-config and yii\base\Configurable interface

Installation

composer require horat1us/yii2-environment-config

Usage

<?php

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_',
]);

Contributors

License

MIT