class ObjectHydrator

Class ObjectHydrator.

Utility class for handling updating private or protected properties of an object.

Methods

object
hydrate($target, array $data)

If given a class name as target, the hydrator will create an instance of that class, but skipping the constructor. The hydrator will then update the internal properties, according to the keys defined in the $data parameter.

Details

at line 35
object hydrate($target, array $data)

If given a class name as target, the hydrator will create an instance of that class, but skipping the constructor. The hydrator will then update the internal properties, according to the keys defined in the $data parameter.

Parameters

$target
array $data

Return Value

object