PHPackages                             wazsmwazsm/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. wazsmwazsm/config

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wazsmwazsm/config
=================

A DotArr Config Tool

v1.0(7y ago)08MITPHPPHP &gt;=5.5

Since Apr 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/wazsmwazsm/Config)[ Packagist](https://packagist.org/packages/wazsmwazsm/config)[ Docs](https://github.com/wazsmwazsm/Config)[ RSS](/packages/wazsmwazsm-config/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Container
=========

[](#container)

[![Build Status](https://camo.githubusercontent.com/e9847640a726ad337c09a1cbfd71bf31127e6231712140cc7274d9b3efb63e8b/68747470733a2f2f7472617669732d63692e6f72672f77617a736d77617a736d2f436f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wazsmwazsm/Config)

安装
--

[](#安装)

```
composer require wazsmwazsm/config
```

使用
--

[](#使用)

配置文件 test\_config.php：

```
return [
	'name' => 'sqlite',
    'connect' => [
        'driver'  => 'sqlite',
        'dbname'  => 'database.db',
        'prefix'  => '',
    ],
];
```

加载配置：

```
use Config\Config;

Config::load('test_config', require('./test_config.php'));
```

获取配置：

```
use Config\Config;
// 获取名称 (配置文件名.配置名)
$name = Config::get('test_config.name'); // sqlite
$connect = Config::get('test_config.connect'); // ['driver'  => 'sqlite','dbname'  => 'database.db','prefix'  => '']
$dbname = Config::get('test_config.connect.dbname'); // database.db

var_dump($name, $connect, $dbname);
```

设置、更改配置：

```
use Config\Config;

Config::set('test_config.name', 'somename');
```

获取全部配置：

```
use Config\Config;

$configs = Config::all();
/*
result is
[
    'test_config' => [
        'name' => 'sqlite',
        'connect' => [
            'driver'  => 'sqlite',
            'dbname'  => 'database.db',
            'prefix'  => '',
        ],
    ]
]
*/
```

License
-------

[](#license)

The Config is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 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

2574d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18749371?v=4)[MrQin](/maintainers/wazsmwazsm)[@wazsmwazsm](https://github.com/wazsmwazsm)

---

Top Contributors

[![wazsmwazsm](https://avatars.githubusercontent.com/u/18749371?v=4)](https://github.com/wazsmwazsm "wazsmwazsm (1 commits)")

---

Tags

configdotarr

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

3.2k493.9M1.6k](/packages/symfony-options-resolver)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[dflydev/dot-access-configuration

Given a deep data structure representing a configuration, access configuration by dot notation.

13414.5M4](/packages/dflydev-dot-access-configuration)[akaunting/laravel-setting

Persistent settings package for Laravel

495805.1k7](/packages/akaunting-laravel-setting)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)[jbzoo/data

An extended version of the ArrayObject object for working with system settings or just for working with data arrays

891.6M23](/packages/jbzoo-data)

PHPackages © 2026

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