Usage is quite simple: simply instantiate the hydrator, and then pass information to it.

1
2
3
4
5
6
7
8
9

useZend\Stdlib\Hydrator;$hydrator=newHydrator\ArraySerializable();$object=newArrayObject(array());$hydrator->hydrate($someData,$object);// or, if the object has data we want as an array:$data=$hydrator->extract($object);