-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hey there,
I was wondering if there was an easy way to map to a destination object where all the properties are in a single associative array?
For example
class Employee
{
private $id;
private $firstName;
private $lastName;
private $birthYear;
public function __construct($id, $firstName, $lastName, $birthYear)
{
$this->id = $id;
$this->firstName = $firstName;
$this->lastName = $lastName;
$this->birthYear = $birthYear;
}
public function getId()
{
return $this->id;
}
// And so on...
}
and MapTo
class EmployeeEntity
{
private $_propDict = [];
public function getId()
{
return $_propDict['id'] ?? null;
}
public function setId($val)
{
$_propDict['id'] = $val;
}
// And so on...
}
Metadata
Metadata
Assignees
Labels
No labels