trait HydratorStrategyTrait

Represents common functionality for populating, or "hydrating", an object with arbitrary data.

Methods

hydrate (array $data, array $aliases = array())

Hydrates an object with set data

set (string $key, $property, array $data, callable $fn = null)

No description

Details

hydrate(array $data, array $aliases = array())

Hydrates an object with set data

Parameters

$data array The data to set
$aliases array Any aliases

Example code

$hydratorStrategyTrait->hydrate($data, $aliases);

set(string $key, $property, array $data, callable $fn = null)

Parameters

$key string
$property
$data array
$fn callable

Example code

$hydratorStrategyTrait->set($key, $property, $data, $fn);