@@ 417-421 (lines=5) @@ | ||
414 | */ |
|
415 | public function setDbData(array $data) |
|
416 | { |
|
417 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
418 | if (array_key_exists($propertyName, $data)) { |
|
419 | $this->setDbValue($propertyName, $data[$propertyName], true); |
|
420 | } |
|
421 | } |
|
422 | } |
|
423 | ||
424 | /** |
|
@@ 441-446 (lines=6) @@ | ||
438 | } |
|
439 | // If there are more row data than properties, use properties as starting point |
|
440 | } else { |
|
441 | foreach (array_keys(static::$dbProperties) as $propertyName) { |
|
442 | $fieldName = static::getDbFieldName($propertyName); |
|
443 | if (array_key_exists($fieldName, $rowData)) { |
|
444 | $this->setDbValue($propertyName, $rowData[$fieldName], false); |
|
445 | } |
|
446 | } |
|
447 | } |
|
448 | } |
|
449 |