/**
* Apply the result to an object.
* @param array a result set row retrieved from the database
* @param object result object, array or list
* @return object result filled with data.
*/
protected function fillResultObjectProperty($row, $resultObject)
{
$index = 0;
$registry = $this->getManager()->getTypeHandlers();
foreach ($row as $k => $v) {
$property = new TResultProperty();
if (is_string($k) && strlen($k) > 0) {
$property->setColumn($k);
}
$property->setColumnIndex(++$index);
$type = gettype(TPropertyAccess::get($resultObject, $k));
$property->setType($type);
$value = $property->getPropertyValue($registry, $row);
TPropertyAccess::set($resultObject, $k, $value);
}
return $resultObject;
}