PHPackages                             shoxabbos/yii2-config - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. shoxabbos/yii2-config

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

shoxabbos/yii2-config
=====================

Yii2 config

1.0.0(8y ago)029MITPHP

Since Jan 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Shoxabbos/yii2-config)[ Packagist](https://packagist.org/packages/shoxabbos/yii2-config)[ RSS](/packages/shoxabbos-yii2-config/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Yii2 config
===========

[](#yii2-config)

Yii2 simple config

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist shoxabbos/yii2-config "*"

```

or add

```
"shoxabbos/yii2-config": "*"

```

to the require section of your `composer.json` file.

Demo
----

[](#demo)

[![alt text](https://github.com/Shoxabbos/yii2-config/raw/master/demo.png)](https://github.com/Shoxabbos/yii2-config/blob/master/demo.png)

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

##### Run migrations

[](#run-migrations)

```
./yii migrate  --migrationPath="@shoxabbos/config"
```

##### Controller map

[](#controller-map)

For example: adding settings pages to admin module

```
'modules' => [
    'admin' => [
        'class' => 'app\modules\admin\Module',
        'controllerMap' => [
            'config' => 'shoxabbos\config\controllers\ConfigController'
        ]
    ],
]
```

After that, you can open the pages as:

```
/admin/config/create
/admin/config/update
/admin/config/view
/admin/config/index
```

Conponent
---------

[](#conponent)

Register the package as a component

```
'components' => [
    'config' => [
        'class' => 'shoxabbos\config\Config',
    ],
]
```

##### Get config object

[](#get-config-object)

```
\Yii::$app->config->get('key');
```

##### Get config object property

[](#get-config-object-property)

```
\Yii::$app->config->get('key', 'propertyName');
```

##### Set cache duration

[](#set-cache-duration)

```
\Yii::$app->config->get('key', 'propertyName', 3600 * 24);
```

##### Set config

[](#set-config)

```
\Yii::$app->config->set('key', 'varchar 255', 'text');
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3036d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa672147eb465e2aab488eea53cfd004c486f00086b45c78d1dc8515300f6d59?d=identicon)[shoxabbos](/maintainers/shoxabbos)

---

Top Contributors

[![shoxabbos](https://avatars.githubusercontent.com/u/8403807?v=4)](https://github.com/shoxabbos "shoxabbos (9 commits)")

---

Tags

yii2-config-componentyii2-extensionyii2-simple-db-configyii2extension

### Embed Badge

![Health badge](/badges/shoxabbos-yii2-config/health.svg)

```
[![Health](https://phpackages.com/badges/shoxabbos-yii2-config/health.svg)](https://phpackages.com/packages/shoxabbos-yii2-config)
```

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
