src/AbstractDbEntity.php
public function setDbDataFromRow(array $rowData)
    {
        // If there are less row data than properties, use rows as starting point (optimization)
        if (count($rowData) < count(static::$dbProperties)) {
            foreach ($rowData as $dbFieldName => $value) {
                $propertyName = static::getDbPropertyName($dbFieldName);
                if (isset(static::$dbProperties[$propertyName])) {
                    $this->setDbValue($propertyName, $value, false);
                }
            }
        // If there are more row data than properties, use properties as starting point
        } else {
            foreach (array_keys(static::$dbProperties) as $propertyName) {
                $fieldName = static::getDbFieldName($propertyName);
                if (array_key_exists($fieldName, $rowData)) {
                    $this->setDbValue($propertyName, $rowData[$fieldName], false);
                }
            }
        }

        $this->updatePrimaryDbValueFromDbData();
    }
public function setDbDataFromRow(array $rowData)
    {
        // If there are less row data than properties, use rows as starting point (optimization)
        if (count($rowData) < count(static::$dbProperties)) {
            foreach ($rowData as $dbFieldName => $value) {
                $propertyName = static::getDbPropertyName($dbFieldName);
                if (isset(static::$dbProperties[$propertyName])) {
                    $this->setDbValue($propertyName, $value, false);
                }
            }
        // If there are more row data than properties, use properties as starting point
        } else {
            foreach (array_keys(static::$dbProperties) as $propertyName) {
                $fieldName = static::getDbFieldName($propertyName);
                if (array_key_exists($fieldName, $rowData)) {
                    $this->setDbValue($propertyName, $rowData[$fieldName], false);
                }
            }
        }

        $this->updatePrimaryDbValueFromDbData();
    }
public function setDbDataFromRow ( array $ rowData ) { // If there are less row data than properties, use rows as starting point (optimization) if ( count ( $ rowData ) < count ( static :: $ dbProperties ) ) { foreach ( $ rowData as $ dbFieldName => $ value ) { $ propertyName = static :: getDbPropertyName ( $ dbFieldName ) ; if ( isset ( static :: $ dbProperties [ $ propertyName ] ) ) { $ this -> setDbValue ( $ propertyName , $ value , false ) ; } } // If there are more row data than properties, use properties as starting point } else { foreach ( array_keys ( static :: $ dbProperties ) as $ propertyName ) { $ fieldName = static :: getDbFieldName ( $ propertyName ) ; if ( array_key_exists ( $ fieldName , $ rowData ) ) { $ this -> setDbValue ( $ propertyName , $ rowData [ $ fieldName ] , false ) ; } } } $ this -> updatePrimaryDbValueFromDbData ( ) ; }
Set db data from raw database row data with field names in database format.

@param array $rowData
Set db data from raw database row data with field names in database format .