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

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

wwtg99/config
=============

0.1.2(9y ago)1461MITPHPPHP &gt;=5.4

Since Jul 30Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (5)Used By (1)

Config loader
=============

[](#config-loader)

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

[](#installation)

#### Install from composer

[](#install-from-composer)

```
composer require "wwtg99/config"

```

Or in composer.json require

```
"wwtg99/config": "*"

```

Usage
-----

[](#usage)

```
$conf = new ConfigPool();  // or new ConfigPool('path/to/cache_file') to enable cache
// Define config resource
// File config source should specify conf directories and conf files. Config will be merged by array_merge().
$source = new FileSource(['default__conf', 'user_conf'], ['conf1.json', 'conf2.php']);
// Define file loader to handle conf files. Supported loaders: JsonLoader, PHPLoader, YamlLoader.
$source->addLoader(new JsonLoader())->addLoader(new PHPLoader());
// Redis source should defined the key (default config) and redis parameters.
// If use redis, should disable cache to get better performance and enable to deploy central configuration.
// $source = new RedisSource();
// Set source for config, one source or an array of sources
$conf->addSource($source);
// Load config
$conf->load();
// Get config, support dot(.) to search in array, ex: a.b.c search for a['b']['c']
$val = $conf->get('name', 'default_val');
// Use .(dot) to search array
$val = $conf->get('arr.val');
// Set config
$conf->set('name', 'val');
// Get changed config by export()
$config = $conf->export();
// Save changed config to cache if use cache file
$conf->saveCache();

```

If use cache file and cache file exists, config will always loaded from cache regardless of origin conf files.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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 ~2 days

Total

3

Last Release

3618d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.6

0.1.2PHP &gt;=5.4

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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