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

Abandoned → [tcwei/config](/?search=tcwei%2Fconfig)Library[Utility &amp; Helpers](/categories/utility)

lipowei/config
==============

配置类，实现读取任意配置目录下的配置，支持多级获取

v2.0(5y ago)018MITPHP

Since Jun 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ITzhiwei/Config)[ Packagist](https://packagist.org/packages/lipowei/config)[ RSS](/packages/lipowei-config/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (3)Used By (0)

Config 实现读取任意配置目录下的配置
=====================

[](#config-实现读取任意配置目录下的配置)

安装
==

[](#安装)

composer require tcwei/config

用法
==

[](#用法)

```
use tcwei\configClass\Config;
//方式一：
$config = new Config;
$sqlUser = $config['database.username'];//获取数据库配置文件中的 username
$sqlAll = $config['database.*'];//获取数据库配置文件中的全部信息

//方式二：
$sqlUser = Config::pull('database.username');
$sqlAll = Config::pull('database.*');

```

配置文件所在目录
========

[](#配置文件所在目录)

- 默认配置目录为 vendor 的同级目录 config，如果修改配置目录，可以使用 Config::$path = 'you dir'

其他说明
====

[](#其他说明)

- 支持多级获取，例如： Config::pull('a.b.c');
- 可以不加前缀，例如： Config::pull('webName') 会自动转为 Config::pull('app.webName')
- 有demo，demo所在：vendor/tcwei/config/demo

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Every ~0 days

Total

2

Last Release

2147d ago

Major Versions

v1.0 → v2.02020-06-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/64b02e6dd1c2046465a92a43050180747375fed27151c08abc2a336d83968d92?d=identicon)[ITwuzhiwei](/maintainers/ITwuzhiwei)

---

Top Contributors

[![ITzhiwei](https://avatars.githubusercontent.com/u/31977386?v=4)](https://github.com/ITzhiwei "ITzhiwei (6 commits)")

### Embed Badge

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

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

###  Alternatives

[carlcs/craft-redactorcustomstyles

Redactor Custom Styles plugin for Craft CMS

59221.7k3](/packages/carlcs-craft-redactorcustomstyles)[apinstein/expiring-hash

A utililty to easily create crypographically signed URLs for temporary ad-hoc URL access.

1634.4k1](/packages/apinstein-expiring-hash)[serkanalgur/cmb2-field-faiconselect

Font Awesome icon selector for powerful custom metabox generator CMB2

202.2k](/packages/serkanalgur-cmb2-field-faiconselect)

PHPackages © 2026

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