2017 © Pedro Peláez
 

library hydrator

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

image

onemustwork/hydrator

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  • Sunday, January 8, 2017
  • by onemustwork
  • Repository
  • 0 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Hydrator

Simple to use hydrator to hydrate an object from array or extract an object to an array., (*1)

Usage

To install the hydrator use the following command;, (*2)

composer require onemustwork/hydrator

Hydrating

To hydrate an object you can use the hydrate method;, (*3)

$object = new Object(); // The object to hydrate
$data = ['some_field' => 'some_value', 'boolean_field' => true];
$object = $hydrator->hydrate($object, $data);

Extracting

To extract an entity to an array you can use the extract method;, (*4)

$array = $hydrator->extract($object);

Todo

  • Add strategies
  • Add unit tests

The Versions

08/01 2017

dev-master

9999999-dev

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator

08/01 2017

dev-develop

dev-develop

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator

08/01 2017

v0.1.3

0.1.3.0

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator

21/12 2016

v0.1.2

0.1.2.0

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator

21/12 2016

v0.1.1

0.1.1.0

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator

19/12 2016

v0.1.0

0.1.0.0

Easy to use hydrator to hydrate objects from an array or extract objects to an array.

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array simple object hydrator