public function load($obj)
{
$this->actual = new \stdClass();
$isObject = is_object($obj);
foreach ($this->getIterator() as $property => $v) {
if ($isObject && !isset($obj->{$property}) || !$isObject && !isset($obj[$property])) {
continue;
} else {
$value = $isObject ? $obj->{$property} : $obj[$property];
}
$this->{$property} = $value;
$this->actual->{$property} = $value;
}
}