protected function translateRow($row, $format) {
        // Apply the row filter.
        if (isset($format['rowfilter'])) {
            call_user_func_array($format['rowfilter'], array(&$row));
        }

        $result = array();
        foreach ($format['columns'] as $key => $cdef) {
            if (array_key_exists($cdef['sourcecolumn'], $row))
                $value = $row[$cdef['sourcecolumn']];
            else
                $value = $cdef['default'];

            if (isset($cdef['filter'])) {
                $value = call_user_func($cdef['filter'], $value, $key, $row);
            }

            $result[$cdef[0]] = $value;
        }
        return $result;
    }
protected function translateRow($row, $format) {
        // Apply the row filter.
        if (isset($format['rowfilter'])) {
            call_user_func_array($format['rowfilter'], array(&$row));
        }

        $result = array();
        foreach ($format['columns'] as $key => $cdef) {
            if (array_key_exists($cdef['sourcecolumn'], $row))
                $value = $row[$cdef['sourcecolumn']];
            else
                $value = $cdef['default'];

            if (isset($cdef['filter'])) {
                $value = call_user_func($cdef['filter'], $value, $key, $row);
            }

            $result[$cdef[0]] = $value;
        }
        return $result;
    }
protected function translateRow ( $ row , $ format ) { // Apply the row filter. if ( isset ( $ format [ 'rowfilter' ] ) ) { call_user_func_array ( $ format [ 'rowfilter' ] , array ( & $ row ) ) ; } $ result = array ( ) ; foreach ( $ format [ 'columns' ] as $ key => $ cdef ) { if ( array_key_exists ( $ cdef [ 'sourcecolumn' ] , $ row ) ) $ value = $ row [ $ cdef [ 'sourcecolumn' ] ] ; else $ value = $ cdef [ 'default' ] ; if ( isset ( $ cdef [ 'filter' ] ) ) { $ value = call_user_func ( $ cdef [ 'filter' ] , $ value , $ key , $ row ) ; } $ result [ $ cdef [ 0 ] ] = $ value ; } return $ result ; }
Translate a row from one row format to another.

@param array $row The data to translate.
@param array $format The translation format.
@return array The translated row.
Translate a row from one row format to another .