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