2017 © Pedro Peláez
 

library hydrator

Hydrator to map or extract an extract object

image

onemustcode/hydrator

Hydrator to map or extract an extract object

  • Friday, April 14, 2017
  • by onemustcode
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,262 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 79 % 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 onemustcode/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 object to an array you can use the extract method;, (*4)

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

Todo

  • Add strategies
  • Add unit tests

The Versions

14/04 2017

dev-master

9999999-dev

Hydrator to map or extract an extract object

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array object hydrator map

14/04 2017

v0.1.1

0.1.1.0

Hydrator to map or extract an extract object

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array object hydrator map

30/01 2017

v0.1.0

0.1.0.0

Hydrator to map or extract an extract object

  Sources   Download

MIT

The Requires

 

by Jeffrey Buitenhuis

array object hydrator map