PHPackages                             michaels/data-manager - 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. michaels/data-manager

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

michaels/data-manager
=====================

Simple data manager for nested data, dot notation array access, extendability, and container interoperability.

v0.9.3(9y ago)121.9k2[5 issues](https://github.com/chrismichaels84/data-manager/issues)2MITPHPPHP &gt;=5.6.0CI failing

Since Apr 9Pushed 5y ago6 watchersCompare

[ Source](https://github.com/chrismichaels84/data-manager)[ Packagist](https://packagist.org/packages/michaels/data-manager)[ Docs](https://github.com/chrismichaels84/data-manager)[ RSS](/packages/michaels-data-manager/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (20)Used By (2)

> While this still works, it should be considered abandoned. Any PR issued will be accepted w/o question. If you want to own this repository, open an issue and contact me.

Data Manager
============

[](#data-manager)

[![Latest Version](https://camo.githubusercontent.com/f771a107706477862bd7e44238ebac29db2575a46a3004f9fd4c2456d6b63ffa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f63687269736d69636861656c7338342f646174612d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://github.com/chrismichaels84/data-manager/releases)[![Documentation Status](https://camo.githubusercontent.com/9f1ce7e17c661d88c99ff838898678845e40c28a6ba0ab8071da22cb06c63f20/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f646174612d6d616e616765722f62616467652f3f76657273696f6e3d6c6174657374)](http://data-manager.readthedocs.io/en/latest/?badge=latest)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/2e4f82e380620a8285d0e41a1406913d6a8942a2a7d30745ae00a07145677848/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f63687269736d69636861656c7338342f646174612d6d616e616765722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/chrismichaels84/data-manager)[![Coverage Status](https://camo.githubusercontent.com/4bff2fa8fc6a12ad2820e472e70799eeb6ee79b6785b5d85865e51ce0bd38402/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f63687269736d69636861656c7338342f646174612d6d616e616765722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/chrismichaels84/data-manager?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/7476a626f8975476d78aa4230bdeff373ba99950633d688f718cf442ca10ed0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f63687269736d69636861656c7338342f646174612d6d616e616765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/chrismichaels84/data-manager/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/0365d741f62ad29327fdf194a0106f9f847d2b182cd17fadc49e6971ba386729/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c732f646174612d6d616e616765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/michaels/data-manager)

[![SensioLabsInsight](https://camo.githubusercontent.com/0b195ab13f58af036596dde089a7290d7e949ab0915b840cbfeb7393c75aeb15/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f33656633623961342d363037382d346464662d626630642d6338346461633837663337612f6269672e706e67)](https://insight.sensiolabs.com/projects/3ef3b9a4-6078-4ddf-bf0d-c84dac87f37a)

Simple data manager for nested data, dot notation access, extendability, and container interoperability.

**[See Full Documentation](http://data-manager.readthedocs.io/en/latest/)**

Goals
-----

[](#goals)

- Light weight and fluent, simple, clear API
- Manage nested data via dot-notation
- Be [composable](docs/compose.md) - integrate into current containers via traits (extras)
- Include extras for
    - [Loading Files](docs/load-files.md),
    - [Managing IoC](docs/ioc.md) / Dependencies.
- Allow for protected data (immutable) and default values.
- IoC container should:
    - Resolve via classes, factories, etc
    - Configure dependencies for dependencies,
    - Allow for fallbacks, preparing objects, and more.
- Full test coverage, PSR compliant, [container interoperability](https://github.com/container-interop/container-interop), and best practices

Install
-------

[](#install)

Via Composer

```
$ composer require michaels/data-manager
```

Getting Started
---------------

[](#getting-started)

Manager does exactly what you would expect: it *manages* complex items such as config data, arrays, and closures. The best way to get started is simply instantiate `Michaels\Manager\Manager`

```
$manager = new Michaels\Manager\Manager([
    'some' => [
        'starting' => [
            'data' => 'here (optional)'
        ]
    ]
]);
// Note, you may initialize Manager with an array or any instance of Traversable (like Manager itself)

/* Basic Usage. All works with dot notation as well */
$manager->add('name', 'value');
$manager->add('some.nested.data', 3); // Use dot notation for namespacing or nesting
$manager->get('name'); // 'value'
$manager->get('doesntexist', 'fallback'); // 'fallback'
$manager->get('doesntexist') // throws an ItemNotFoundException with no fallback
$manager->getIfHas('doesntexist') // returns a NoItemFoundMessage instead of a script-stopping exception
$manager->getAll(); // returns array of all items
$manager->all(); // returns array of all items
$manager->exists('name'); // true
$manager->exists('some.starting.data'); // true
$manager->exists('nope'); // false
$manager->has('something'); // alias of exist
$manager->set('name', 'new-value'); // updates item
$manager->remove('some.starting.data');
$manager->isEmpty(); // true or false
$manager->toJson(); // returns json of all items
echo $manager; // returns json string of all items
$manager->reset($array); // rebuild with new items
$manager->clear(); // empty the manager

/* You can also use $manager as an array or in loops */
$manager['some']['starting']['data']; // 'here (optional)'
//etc

foreach ($manager as $item => $value) {
    // do whatever your heart desires
}

/* You may also push elements onto an array */
$manager->set('a.b', []);
$manager->push('a.b', 'c', 'd', 'e');
$manager->get('a.b'); // ['c', 'd', 'e']

/* Finally, you may manage values using magic methods */
$manager->some()->starting()->data; // 'here (optional)'
$manager->some()->item = 'item'; // sets some.item = 'item'
$manager->some()->item()->drop(); // deletes some.item

// Note that levels are called as a method with no params. The data is then called, updated, or set as a property.
```

Advanced Features
-----------------

[](#advanced-features)

See [documentation](http://data-manager.readthedocs.io/en/latest/) for topics like protecting data, using as an ioc container, loading files, using as an array, defaults, composing, and more.

Interoperability
----------------

[](#interoperability)

Data Manager is [PSR compliant](http://www.php-fig.org/) and [Container Interoperability](https://github.com/container-interop/container-interop) compliant. Any oversights, please let me know.

Testing
-------

[](#testing)

We try for at least 80% test coverage.

```
$ phpunit
```

You may also use the **tests** under `tests/traits` to test your integrated functionality. You may have to grab these through cloning the repo. composer usually won't include tests in your `require`

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Michael Wilson](https://github.com/chrismichaels84)
- [Scott](https://github.com/smolinari)
- Open an issue to join in!

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84% 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 ~53 days

Recently: every ~90 days

Total

14

Last Release

3358d ago

PHP version history (2 changes)v0.8PHP &gt;=5.4.0

v0.9.2PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6737bd5ffc92de869a9c8bc96bee45c5e8b802393e9c7b8b0d55b951aef4166c?d=identicon)[chrismichaels84](/maintainers/chrismichaels84)

---

Top Contributors

[![electricjones](https://avatars.githubusercontent.com/u/5412413?v=4)](https://github.com/electricjones "electricjones (152 commits)")[![smolinari](https://avatars.githubusercontent.com/u/3314957?v=4)](https://github.com/smolinari "smolinari (26 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (3 commits)")

---

Tags

jsoncontainerconfigurationarrayconfignesteddependency-injectiondataiocmanagercollectionaccessnestdot notationdefaultsdeep data

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michaels-data-manager/health.svg)

```
[![Health](https://phpackages.com/badges/michaels-data-manager/health.svg)](https://phpackages.com/packages/michaels-data-manager)
```

###  Alternatives

[league/config

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

564302.2M24](/packages/league-config)[jbzoo/data

An extended version of the ArrayObject object for working with system settings or just for working with data arrays

891.6M23](/packages/jbzoo-data)[graze/data-structure

Data collections and containers

12287.4k8](/packages/graze-data-structure)[yansongda/supports

common components

211.4M31](/packages/yansongda-supports)[armincms/json

A Laravel Nova field.

25149.4k3](/packages/armincms-json)[hi-folks/data-block

Data class for managing nested arrays and JSON data.

1472.2k](/packages/hi-folks-data-block)

PHPackages © 2026

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