|
@@ 494-498 (lines=5) @@
|
| 491 |
|
*/ |
| 492 |
|
public function setDbData(array $data) |
| 493 |
|
{ |
| 494 |
|
foreach (array_keys(static::$dbProperties) as $propertyName) { |
| 495 |
|
if (array_key_exists($propertyName, $data)) { |
| 496 |
|
$this->setDbValue($propertyName, $data[$propertyName], true); |
| 497 |
|
} |
| 498 |
|
} |
| 499 |
|
} |
| 500 |
|
|
| 501 |
|
/** |
|
@@ 518-523 (lines=6) @@
|
| 515 |
|
} |
| 516 |
|
// If there are more row data than properties, use properties as starting point |
| 517 |
|
} else { |
| 518 |
|
foreach (array_keys(static::$dbProperties) as $propertyName) { |
| 519 |
|
$fieldName = static::getDbFieldName($propertyName); |
| 520 |
|
if (array_key_exists($fieldName, $rowData)) { |
| 521 |
|
$this->setDbValue($propertyName, $rowData[$fieldName], false); |
| 522 |
|
} |
| 523 |
|
} |
| 524 |
|
} |
| 525 |
|
|
| 526 |
|
$primaryDbValue = $this->getPrimaryDbValueFromRow($rowData); |