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

ActiveLibrary

glennmcewan/config
==================

Simple Config Manager, Loader, and Writer.

214[2 PRs](https://github.com/glennmcewan/config/pulls)PHP

Since Feb 23Pushed 1y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (4)Used By (0)

Config
======

[](#config)

[![Total Downloads](https://camo.githubusercontent.com/2a8d9be5f7facadf9f9b2cc507e4bfbc81867af835e5fe06b59a7c3f8fdb8555/68747470733a2f2f706f7365722e707567782e6f72672f676c656e6e6d636577616e2f636f6e6669672f646f776e6c6f616473)](https://packagist.org/packages/glennmcewan/config)[![Build Status](https://camo.githubusercontent.com/aeec0eeb742f1ebb749a931485b2ef8139e419b1a8ca6819c42f5a2b66ce09f0/68747470733a2f2f7472617669732d63692e6f72672f676c656e6e6d636577616e2f636f6e6669672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/glennmcewan/config)[![StyleCI](https://camo.githubusercontent.com/604e9337253ad5f21166c2dea25faa5484ed40348acbb05ddf8024ba575cd024/68747470733a2f2f7374796c6563692e696f2f7265706f732f37353938363432332f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/75986423)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c7747c890959ae60ffa36c3f166586d5f623e2901f0f21a2f995df85358be15e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676c656e6e6d636577616e2f636f6e6669672f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/glennmcewan/config/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/36544eb4aa306d198f63e4a69b5c9df05ae0fb7817a2475b067ee098104c9b9b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676c656e6e6d636577616e2f636f6e6669672f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/glennmcewan/config/?branch=master)

Small but powerful Config package. Suitable for basic config handling with plain arrays or various config files, whilst remaining easy to use when scaling for use in larger applications with more complex configuration setups.

Requirements
------------

[](#requirements)

`PHP 5.5+`. Master is CI tested on the following versions of PHP: `5.5`, `5.6`, `7.0`, `7.1`, and `HHVM`.

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

[](#installation)

### With Composer

[](#with-composer)

```
$ composer require glennmcewan/config

```

or add the package name to the require block in your `composer.json` file:

```
{
	"require": {
		"glennmcewan/config": "dev-master"
	}
}

```

### Without Composer

[](#without-composer)

This package can still be used without Composer -- at the cost of no included autoloader.

Usage
-----

[](#usage)

### Basics

[](#basics)

- Creating a new instance of the Config Manager

```
$config = new Glenn\Config\Manager;
```

- Setting Config Values

```
$config->set('name', 'Glenn');
$config->set('age', 18);
$config->set('languages', ['English', 'Spanish']);

// TODO: setting array of keys in bulk. This means re-factoring @setFromParser. It's a smelly method anyway, remove it and instead add a @setFromArray or something.
```

- Getting Config values

```
echo $config->get('name'); // 'Glenn'

echo $config->get('age'); // 18

echo $config->get('languages'); // [0 => 'English', 1 => 'Spanish']

echo $config->get('gender'); // null

echo $config->get('gender', 'male'); // 'male'
```

- Changing Config values

```
$config->set('name', 'Glenn');

echo $config->get('name'); // 'Glenn'

$config->set('name', 'Dave');

echo $config->get('name'); // 'Dave'
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.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.

### Community

---

Top Contributors

[![glennmcewan](https://avatars.githubusercontent.com/u/26575756?v=4)](https://github.com/glennmcewan "glennmcewan (72 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

composerconfigconfigurationmanagerpackagephp

### Embed Badge

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

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

PHPackages © 2026

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