2017 © Pedro Peláez
 

library array-object-converter

A module to copy data from an array to an object, vice versa.

image

rkr/array-object-converter

A module to copy data from an array to an object, vice versa.

  • Monday, December 15, 2014
  • by rkr
  • Repository
  • 1 Watchers
  • 2 Stars
  • 3,454 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 21 % Grown

The README.md

array-object-converter

A module to copy data from an array into an object, vice versa. Requires PHP 5.4+., (*1)

You have to provide information for targeted objects to describe how properties are connected to array keys. This is done through "SpecificationProvider"s., (*2)

Right now there is just one provider ready: The PhpDocSpecificationProvider extracts the annotations from the object's methods. Other providers may follow, if I find some time for that., (*3)

If all objects are equipped with propper annotations, you can do this:, (*4)

$array = (new ArrayObjectConverter($entity))->getArray();, (*5)

Or the other way around:, (*6)

$object = (new ArrayObjectConverter($entity))->setArray($array);, (*7)

The Versions

15/12 2014

dev-master

9999999-dev

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

The Requires

  • php >= 5.3.0

 

The Development Requires

by Ronald Kirschler

15/12 2014

1.0.5

1.0.5.0

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

The Requires

  • php >= 5.3.0

 

The Development Requires

by Ronald Kirschler

15/12 2014

1.0.4

1.0.4.0

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

The Requires

  • php >= 5.3.0

 

The Development Requires

by Ronald Kirschler

19/12 2013

1.0.3

1.0.3.0

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

The Requires

  • php >= 5.3.0

 

The Development Requires

by Ron

19/12 2013

1.0.2

1.0.2.0

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

The Requires

  • php >= 5.3.0

 

The Development Requires

by Ron

19/12 2013

1.0.1

1.0.1.0

A module to copy data from an array to an object, vice versa.

  Sources   Download

MIT

by Ron