public
|
__construct(
array<array-key, array-key|array-key[]> $keyMap,
ArrayMapper::CONFORMITY_* $conformity = ArrayMapper::CONFORMITY_NONE,
int-mask-of<ArrayMapper::REMOVE_NULL|ArrayMapper::ADD_UNMAPPED|ArrayMapper::ADD_MISSING|ArrayMapper::REQUIRE_MAPPED> $flags = ArrayMapper::ADD_UNMAPPED,
)
Creates a new array mapper
Creates a new array mapper
Default behaviour:
- ignore missing values (maps for which the input array has no data)
- keep unmapped values (input that isn't mapped to a different key)
- keep
null values
Parameters
$keyMap |
An array that maps
input keys to one or multiple output keys.
|
$conformity |
Use
{@see ArrayMapper::CONFORMITY_COMPLETE} wherever possible to improve
performance.
|
|
#
|