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

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

lsys/config
===========

lsys module config

0.0.1(5y ago)01.1k20Apache-2.0PHPCI failing

Since Jul 3Pushed 5y agoCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (20)

配置层
===

[](#配置层)

[![Build Status](https://camo.githubusercontent.com/39bf33f7fb24da4eb5d56a52f81c778097f26ef3b7b79abb5049b96cd72c2b1a/68747470733a2f2f7472617669732d63692e636f6d2f7068702d6c7379732f636f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/php-lsys/config)[![Coverage Status](https://camo.githubusercontent.com/c7c0d77a73f6f77f4eaacf7455552666d654c6179704ce9668cc3ebf5eb7b6ee/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f7068702d6c7379732f636f6e6669672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/php-lsys/config?branch=master)

> 封装此类库是为了实现功能与配置的分离

使用示例:

```
//-----------------------通过文件------------------------
//配置文件 :dome/config/aa.php
use LSYS\Config\File;
$c=new File("aa.a");
var_dump($c->get('fasd'));

```

```
//-----------------------可写的文件------------------------
//配置文件 :dome/config/aa.php
use LSYS\Config\FileRW;
$c = new FileRW("aa");
$c->set("a",array("fasd"=>"fasdf","faasdsd"=>"fadafdssdf"));
var_dump($c->get("a"));

```

```
//-----------------------INI文件------------------------
//配置文件 :dome/config/application.ini
//此方式跟yaf的config的ini类似
use LSYS\Config\INI;
//选择区段,区段间可继承,方便各种环境切换
INI::$section='cccc';
$c=new INI("application.application");
print_r($c->get('dispatcher'));

```

```
//---------------------数组配置----------------------------
//通过数组生成配置对象,方便你已有配置,需转换成config接口对象时使用
$config=new LSYS\Config\Arr("name",array(
'dome'=>'domevalue'
/*示例数组*/
));

```

> 如果你的配置需求上面的还不能满足,你实现下config接口吧...

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% 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

2142d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f1652fec3beae86de90c6615dd28be4729251e1b2bb08f1cd18e8193e6c4e48?d=identicon)[lsys](/maintainers/lsys)

---

Top Contributors

[![shanliu](https://avatars.githubusercontent.com/u/2927231?v=4)](https://github.com/shanliu "shanliu (12 commits)")[![php-lsys](https://avatars.githubusercontent.com/u/43031308?v=4)](https://github.com/php-lsys "php-lsys (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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