@@ 540-544 (lines=5) @@ | ||
537 | */ |
|
538 | public function setDbData(array $data) |
|
539 | { |
|
540 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
541 | if (array_key_exists($propertyName, $data)) { |
|
542 | $this->setDbValue($propertyName, $data[$propertyName], true); |
|
543 | } |
|
544 | } |
|
545 | } |
|
546 | ||
547 | /** |
|
@@ 564-569 (lines=6) @@ | ||
561 | } |
|
562 | // If there are more row data than properties, use properties as starting point |
|
563 | } else { |
|
564 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
565 | $fieldName = static::getDbFieldName($propertyName); |
|
566 | if (array_key_exists($fieldName, $rowData)) { |
|
567 | $this->setDbValue($propertyName, $rowData[$fieldName], false); |
|
568 | } |
|
569 | } |
|
570 | } |
|
571 | ||
572 | $this->updatePrimaryDbValueFromDbData(); |