@@ 437-441 (lines=5) @@ | ||
434 | */ |
|
435 | public function setDbData(array $data) |
|
436 | { |
|
437 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
438 | if (array_key_exists($propertyName, $data)) { |
|
439 | $this->setDbValue($propertyName, $data[$propertyName], true); |
|
440 | } |
|
441 | } |
|
442 | } |
|
443 | ||
444 | /** |
|
@@ 461-466 (lines=6) @@ | ||
458 | } |
|
459 | // If there are more row data than properties, use properties as starting point |
|
460 | } else { |
|
461 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
462 | $fieldName = static::getDbFieldName($propertyName); |
|
463 | if (array_key_exists($fieldName, $rowData)) { |
|
464 | $this->setDbValue($propertyName, $rowData[$fieldName], false); |
|
465 | } |
|
466 | } |
|
467 | } |
|
468 | } |
|
469 |