DataMappingHelper
in package
Table of Contents
Methods
- Map() : mixed
- Maps a class properties by an array
- MapArray() : null|array<string|int, mixed>
- Maps an array of multiple instances of a class
Methods
Map()
Maps a class properties by an array
public
static Map(null|array<string|int, mixed> $properties, mixed $objOrClassOrConstructor) : mixed
Parameters
- $properties : null|array<string|int, mixed>
-
Properties to map over
- $objOrClassOrConstructor : mixed
-
The Objects instance, class or a callable constructor
MapArray()
Maps an array of multiple instances of a class
public
static MapArray(null|array<string|int, mixed> $array, class|callable $objClassOrConstructor) : null|array<string|int, mixed>
Parameters
- $array : null|array<string|int, mixed>
-
Array with Items of a class
- $objClassOrConstructor : class|callable
-
The Objects class or a callable constructor