@@ 548-552 (lines=5) @@ | ||
545 | */ |
|
546 | public function setDbData(array $data) |
|
547 | { |
|
548 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
549 | if (array_key_exists($propertyName, $data)) { |
|
550 | $this->setDbValue($propertyName, $data[$propertyName], true); |
|
551 | } |
|
552 | } |
|
553 | } |
|
554 | ||
555 | /** |
|
@@ 572-577 (lines=6) @@ | ||
569 | } |
|
570 | // If there are more row data than properties, use properties as starting point |
|
571 | } else { |
|
572 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
573 | $fieldName = static::getDbFieldName($propertyName); |
|
574 | if (array_key_exists($fieldName, $rowData)) { |
|
575 | $this->setDbValue($propertyName, $rowData[$fieldName], false); |
|
576 | } |
|
577 | } |
|
578 | } |
|
579 | ||
580 | $this->updatePrimaryDbValueFromDbData(); |