2017 © Pedro Peláez
 

library data-manager

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

image

michaels/data-manager

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

  • Wednesday, March 8, 2017
  • by chrismichaels84
  • Repository
  • 7 Watchers
  • 10 Stars
  • 1,745 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 5 Open issues
  • 20 Versions
  • 1 % Grown

The README.md

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., (*1)

Data Manager

Latest Version Documentation Status Software License Build Status Coverage Status Scrutinizer Code Quality Total Downloads, (*2)

SensioLabsInsight, (*3)

Simple data manager for nested data, dot notation access, extendability, and container interoperability., (*4)

See Full Documentation, (*5)

Goals

  • Light weight and fluent, simple, clear API
  • Manage nested data via dot-notation
  • Be composable - integrate into current containers via traits (extras)
  • Include extras for
  • 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, and best practices

Install

Via Composer ``` bash $ composer require michaels/data-manager, (*6)


## 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` ```php $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

See documentation for topics like protecting data, using as an ioc container, loading files, using as an array, defaults, composing, and more., (*7)

Interoperability

Data Manager is PSR compliant and Container Interoperability compliant. Any oversights, please let me know., (*8)

Testing

We try for at least 80% test coverage. bash $ phpunit, (*9)

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, (*10)

Contributing

Contributions are welcome and will be fully credited. Please see CONTRIBUTING for details., (*11)

Security

If you discover any security related issues, please email chrismichaels84@gmail.com instead of using the issue tracker., (*12)

Credits

License

The MIT License (MIT). Please see License File for more information., (*13)

The Versions

08/03 2017

dev-master

9999999-dev https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

08/03 2017

v0.9.3

0.9.3.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

08/03 2017

dev-develop

dev-develop https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

08/03 2017

v0.9.2

0.9.2.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

22/08 2016

v0.9.1

0.9.1.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

22/08 2016

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

22/08 2016

v0.9

0.9.0.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

11/03 2016

v0.8.9

0.8.9.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

30/12 2015

v0.8.8

0.8.8.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

03/12 2015

v0.8.7

0.8.7.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

03/11 2015

v0.8.6

0.8.6.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

17/09 2015

v0.8.5

0.8.5.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

dependency injection container json configuration config collection array dot notation access data manager ioc nested nest defaults deep data

25/07 2015

v0.8.4

0.8.4.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection array dot notation access data manager nested nest deep data

24/06 2015

v0.8.3

0.8.3.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection array dot notation access data manager nested nest deep data

05/06 2015

v0.8.2

0.8.2.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection array dot notation access data manager nested nest deep data

28/04 2015

v0.8.1

0.8.1.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection array dot notation access data manager nested nest deep data

19/04 2015

v0.8

0.8.0.0 https://github.com/chrismichaels84/data-manager

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

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection array dot notation access data manager nested nest deep data

11/04 2015

dev-tutorial-part-2

dev-tutorial-part-2 http://phoenixlabstech.org/2015/04/17/building-a-data-manager/

Source code for building a simple data manager tutorial. Part 1

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection data manager

11/04 2015

dev-tutorial-part-3

dev-tutorial-part-3 http://phoenixlabstech.org/2015/04/17/building-a-data-manager/

Source code for building a simple data manager tutorial. Part 1

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection data manager

09/04 2015

dev-tutorial-part-1

dev-tutorial-part-1 http://phoenixlabstech.org/2015/04/17/building-a-data-manager/

Source code for building a simple data manager tutorial. Part 1

  Sources   Download

MIT

The Requires

 

The Development Requires

container collection data manager