public function typecastLoadRow(Model $m, $row)
    {
        $id = null;
        if (isset($row[$m->id_field])) {
            // temporary remove id field
            $id = $row[$m->id_field];
            unset($row[$m->id_field]);
        } else {
            $id = null;
        }
        $row = array_combine($this->header, $row);
        if (isset($id)) {
            $row[$m->id_field] = $id;
        }

        foreach ($row as $key => &$value) {
            if ($value === null) {
                continue;
            }

            if ($f = $m->hasField($key)) {
                $value = $this->typecastLoadField($f, $value);
            }
        }

        return $row;
    }
public function typecastLoadRow(Model $m, $row)
    {
        $id = null;
        if (isset($row[$m->id_field])) {
            // temporary remove id field
            $id = $row[$m->id_field];
            unset($row[$m->id_field]);
        } else {
            $id = null;
        }
        $row = array_combine($this->header, $row);
        if (isset($id)) {
            $row[$m->id_field] = $id;
        }

        foreach ($row as $key => &$value) {
            if ($value === null) {
                continue;
            }

            if ($f = $m->hasField($key)) {
                $value = $this->typecastLoadField($f, $value);
            }
        }

        return $row;
    }
public function typecastLoadRow ( Model $ m , $ row ) { $ id = null ; if ( isset ( $ row [ $ m -> id_field ] ) ) { // temporary remove id field $ id = $ row [ $ m -> id_field ] ; unset ( $ row [ $ m -> id_field ] ) ; } else { $ id = null ; } $ row = array_combine ( $ this -> header , $ row ) ; if ( isset ( $ id ) ) { $ row [ $ m -> id_field ] = $ id ; } foreach ( $ row as $ key => & $ value ) { if ( $ value === null ) { continue ; } if ( $ f = $ m -> hasField ( $ key ) ) { $ value = $ this -> typecastLoadField ( $ f , $ value ) ; } } return $ row ; }
Typecasting when load data row.

@param Model $m
@param array $row

@return array
Typecasting when load data row .