buibr / yii2-config
Yii2 Config file for params.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
Type:yii2-extension
pkg:composer/buibr/yii2-config
Requires
- php: >=7.0
- yiisoft/yii2: >=2.0.6
This package is not auto-updated.
Last update: 2025-10-20 20:27:39 UTC
README
Description
It was nightmare for me to use the Yii:$app->params[xxx], and i create ad Config class to do this.
Installation
The preferred way to install this extension is through composer.
To install, either run
$ composer require buibr/yii2config "*"
or add
$ "buibr/yii2config":"*"
to the `require` section of your composer.json file.
Usage
Example if the `params.php` contains this:
...
'mail'=>[
...
'contact' => 'buibr@....',
'from_name' => 'Marketing Team',
...
]
...
then:
Config::param('mail.contact');
For every `.` means sub element of array in the params.
If this elemet is not found will be returned false.
License
buibr/yii2config is released under the MIT License. See the bundled LICENSE for details.