Methods

Initialize.

__construct(array $mapping, array $reverse) 

Parameters

$mapping

array

Map for name conversion on hydration

$reverse

array

Reverse map for name conversion on extraction

Converts the given name so that it can be hydrated by the hydrator.

extract(string $name) : mixed

Parameters

$name

string

The original name

Returns

mixedThe extracted name

Converts the given name so that it can be extracted by the hydrator.

hydrate(string $name) : mixed

Parameters

$name

string

The original name

Returns

mixedThe hydrated name

Safelly flip mapping array.

flipMapping(array $array) : array

Parameters

$array

array

Array to flip

Exceptions

\Zend\Stdlib\Exception\InvalidArgumentException

Returns

arrayFlipped array

 Properties

 

Map for hydrate name conversion.

$mapping : array

 

Reversed map for extract name conversion.

$reverse : array