PHPackages                             exts/configured - 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. exts/configured

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

exts/configured
===============

Configuration class for loading &amp; saving different types of PHP array data

2.2.0(10mo ago)02.9k↓48.3%MITPHPPHP &gt;=8.1

Since Mar 16Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/exts/configured)[ Packagist](https://packagist.org/packages/exts/configured)[ RSS](/packages/exts-configured/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (12)Used By (0)

Exts\\Configured
================

[](#extsconfigured)

This is a library created for loading different types of config files into arrays and being able to easily manage the configuration data using either dot notation or directly accessing the array data.

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

[](#installation)

`composer require exts/configured:1.*`

Example
-------

[](#example)

```
    use Exts\Configured\ConfigLoader;
    use Exts\Configured\Loader\YAML;

    $config = new ConfigLoader(new Yaml(__DIR__ . '/config'));

    // load data directly from file using dot notation
    // database = filename 'database.yml'
    //
    // yaml data example:
    // -------------------
    //  user: 'example'
    //  pass: 'examplepwd'
    //  host: '127.0.0.1'
    //  tble: 'example_table'
    // -------------------

    $dbUser = $config->get('database.user', 'root');
    $dbPass = $config->get('database.pass', 'pass');
    $dbTble = $config->get('database.tble', 'example');
    $dbHost = $config->get('database.host', 'localhost');

    var_dump($dbUser, $dbPass, $dbTble, $dbHost);

    // you can also load the data as an array object
    // this takes a filename directly you can include or exclude the extension 'yml' as an example
    $db = $config->getArrayObject('database');

    // you can access the array data directly like so:
    $dbUser = $db['user'] ?? 'root';

    // you can access the data using dot notation lets say our data looked like laravel for example:
    // ---------------------
    // default: 'mysql'
    // connections:
    //   mysql:
    //     driver: 'mysql'
    //     host: 'localhost'
    //     database: ''
    //     username: ''
    //     password: ''
    //     charset: 'utf8'
    //     collation: 'utf8_unicode_ci'
    //     prefix: ''
    // ---------------------
    // Then we could do something like:

    $dbUser = $db->get('connections.mysql.username', 'root');

    // We can also edit or add mysql data directly using dot notation like so:
    $db->set('connections.mysql.username', 'example_user');
    var_dump($db['connections']['mysql']['username']);

    // Which I think is pretty cool_

```

Saving an `ConfigArray` object using `ConfigStorage` *(since v1.1)*
-------------------------------------------------------------------

[](#saving-an-configarray-object-using-configstorage-since-v11)

```
    use Exts\Configured\ConfigArray;
    use Exts\Configured\ConfigStorage;
    use Exts\Configured\Storage\YAML;

    $saveFile = 'example.yml';
    $saveDirectory = __DIR__ . '/config/';

    $exampleArrayObject = new ConfigArray(['example', 'data']);

    $exampleStorage = new ConfigStorage(new YAML($saveDirectory));
    $exampleStorage->store($saveFile, (array) $exampleArrayObject);
```

Custom Loaders
--------------

[](#custom-loaders)

Custom loaders are pretty simple, just create a class that implements the `LoaderInterface` and call it a day :), will write an example w/ tests later if you'd like.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance53

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~338 days

Recently: every ~637 days

Total

11

Last Release

326d ago

Major Versions

1.3.2 → 2.0.02022-11-20

PHP version history (2 changes)1.0.0PHP &gt;5.6,&gt;=7.0

2.1.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d11ac939290fe178f8787292ce605375859d8c035fbd14c859bf827f069738b?d=identicon)[exts](/maintainers/exts)

---

Top Contributors

[![exts](https://avatars.githubusercontent.com/u/16387107?v=4)](https://github.com/exts "exts (10 commits)")[![G4MR](https://avatars.githubusercontent.com/u/4134947?v=4)](https://github.com/G4MR "G4MR (3 commits)")

---

Tags

configconfig loaderyaml-loaderexts configuredexts config loaderexts config

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/exts-configured/health.svg)

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

###  Alternatives

[opensky/runtime-config-bundle

This bundle provides a way to inject parameters into services at runtime by exposing a RuntimeParameterBag service, which functions exactly like Symfony2's own ParameterBags.

10949.5k1](/packages/opensky-runtime-config-bundle)[caseyamcl/configula

A simple, but versatile, PHP config loader

42146.6k6](/packages/caseyamcl-configula)

PHPackages © 2026

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