eZ\Publish\Core\Persistence\Legacy\Content\Type\Mapper::extractStorageFieldFromRow PHP Method

extractStorageFieldFromRow() protected method

Extracts a StorageFieldDefinition from $row.
protected extractStorageFieldFromRow ( array $row ) : StorageFieldDefinition
$row array
return eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldDefinition
    protected function extractStorageFieldFromRow(array $row)
    {
        $storageFieldDef = new StorageFieldDefinition();
        $storageFieldDef->dataFloat1 = isset($row['ezcontentclass_attribute_data_float1']) ? (double) $row['ezcontentclass_attribute_data_float1'] : null;
        $storageFieldDef->dataFloat2 = isset($row['ezcontentclass_attribute_data_float2']) ? (double) $row['ezcontentclass_attribute_data_float2'] : null;
        $storageFieldDef->dataFloat3 = isset($row['ezcontentclass_attribute_data_float3']) ? (double) $row['ezcontentclass_attribute_data_float3'] : null;
        $storageFieldDef->dataFloat4 = isset($row['ezcontentclass_attribute_data_float4']) ? (double) $row['ezcontentclass_attribute_data_float4'] : null;
        $storageFieldDef->dataInt1 = isset($row['ezcontentclass_attribute_data_int1']) ? (int) $row['ezcontentclass_attribute_data_int1'] : null;
        $storageFieldDef->dataInt2 = isset($row['ezcontentclass_attribute_data_int2']) ? (int) $row['ezcontentclass_attribute_data_int2'] : null;
        $storageFieldDef->dataInt3 = isset($row['ezcontentclass_attribute_data_int3']) ? (int) $row['ezcontentclass_attribute_data_int3'] : null;
        $storageFieldDef->dataInt4 = isset($row['ezcontentclass_attribute_data_int4']) ? (int) $row['ezcontentclass_attribute_data_int4'] : null;
        $storageFieldDef->dataText1 = $row['ezcontentclass_attribute_data_text1'];
        $storageFieldDef->dataText2 = $row['ezcontentclass_attribute_data_text2'];
        $storageFieldDef->dataText3 = $row['ezcontentclass_attribute_data_text3'];
        $storageFieldDef->dataText4 = $row['ezcontentclass_attribute_data_text4'];
        $storageFieldDef->dataText5 = $row['ezcontentclass_attribute_data_text5'];
        $storageFieldDef->serializedDataText = $row['ezcontentclass_attribute_serialized_data_text'];
        return $storageFieldDef;
    }