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

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

emmetog/config
==============

Makes loading and using config files easier

v2.1.1(9y ago)0842GPL-3.0PHP

Since May 1Pushed 9y ago2 watchersCompare

[ Source](https://github.com/emmetog/config)[ Packagist](https://packagist.org/packages/emmetog/config)[ RSS](/packages/emmetog-config/feed)WikiDiscussions master Synced yesterday

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

emmetog/config
==============

[](#emmetogconfig)

Handles configuration files and settings in a neat package.

This package is the heart of many other packages. The config object is a dependency injection container which is passed to other objects on their contruction. Then that object will be able to get all its settings from the config object. This makes it possible to give two different instances of the same object different config objects and have them behave differently! Cool huh!

This package contains two different classes:

- Config *(The real config object)*
- ConfigForMocking *(A 'fake' config object, useful in unit tests when we want to give errors when unmocked configs are used)*

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

[](#installation)

This package is easy to install using [Composer](http://getcomposer.org/), to get started just add it to your composer.json file.

For example:

```
"require": {
    "emmetog/config":    "1.0.*",
    "emmetog/cache":     "1.0.*",
}

```

This package requires the Emmetog\\Cache package, that's why it's also required above.

Usage
-----

[](#usage)

Just create the object you want and use it, for example:

```
$config = new Emmetog\Config\Config('/project/path/config/', new NullCache());

// Get the 'text_color' config variable from the 'theme.config.php' config file.
$textColor = $config->getConfiguration('theme', 'text_color');

```

In the example above the file 'theme.config.php' should have something like this inside:

```

```

Miscellaneous
-------------

[](#miscellaneous)

This package follows the [semantic versioning](http://semver.org/) guidelines.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

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

Every ~194 days

Recently: every ~319 days

Total

8

Last Release

3446d ago

Major Versions

v1.2.1 → v2.0.02013-07-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1182891?v=4)[Emmet O'Grady](/maintainers/emmetog)[@emmetog](https://github.com/emmetog)

---

Top Contributors

[![emmetog](https://avatars.githubusercontent.com/u/1182891?v=4)](https://github.com/emmetog "emmetog (2 commits)")

---

Tags

config

### Embed Badge

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

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

###  Alternatives

[symfony/options-resolver

Provides an improved replacement for the array\_replace PHP function

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

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

565323.7M35](/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

493883.0k7](/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.8M23](/packages/m1-env)[pheme/yii2-settings

Yii2 Database settings

152766.8k7](/packages/pheme-yii2-settings)

PHPackages © 2026

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