code/libraries/joomlatools/library/database/table/abstract.php
public function mapColumns($data, $reverse = false)
    {
        $map = $reverse ? array_flip($this->_column_map) : $this->_column_map;

        $result = null;

        if (is_array($data) || is_object($data))
        {
            $result = array();

            foreach ($data as $column => $value)
            {
                if (is_string($column))
                {
                    //Map the key
                    if (isset($map[$column])) {
                        $column = $map[$column];
                    }
                }
                else
                {
                    //Map the value
                    if (isset($map[$value])) {
                        $value = $map[$value];
                    }
                }

                $result[$column] = $value;
            }

            if (is_object($data)) {
                $result = (object) $result;
            }
        }

        if (is_string($data))
        {
            $result = $data;
            if (isset($map[$data])) {
                $result = $map[$data];
            }
        }

        return $result;
    }
public function mapColumns($data, $reverse = false)
    {
        $map = $reverse ? array_flip($this->_column_map) : $this->_column_map;

        $result = null;

        if (is_array($data) || is_object($data))
        {
            $result = array();

            foreach ($data as $column => $value)
            {
                if (is_string($column))
                {
                    //Map the key
                    if (isset($map[$column])) {
                        $column = $map[$column];
                    }
                }
                else
                {
                    //Map the value
                    if (isset($map[$value])) {
                        $value = $map[$value];
                    }
                }

                $result[$column] = $value;
            }

            if (is_object($data)) {
                $result = (object) $result;
            }
        }

        if (is_string($data))
        {
            $result = $data;
            if (isset($map[$data])) {
                $result = $map[$data];
            }
        }

        return $result;
    }
public function mapColumns ( $ data , $ reverse = false ) { $ map = $ reverse ? array_flip ( $ this -> _column_map ) : $ this -> _column_map ; $ result = null ; if ( is_array ( $ data ) || is_object ( $ data ) ) { $ result = array ( ) ; foreach ( $ data as $ column => $ value ) { if ( is_string ( $ column ) ) { //Map the key if ( isset ( $ map [ $ column ] ) ) { $ column = $ map [ $ column ] ; } } else { //Map the value if ( isset ( $ map [ $ value ] ) ) { $ value = $ map [ $ value ] ; } } $ result [ $ column ] = $ value ; } if ( is_object ( $ data ) ) { $ result = ( object ) $ result ; } } if ( is_string ( $ data ) ) { $ result = $ data ; if ( isset ( $ map [ $ data ] ) ) { $ result = $ map [ $ data ] ; } } return $ result ; }
Table map method

This functions maps the column names to those in the table schema

@param  array|string $data    An associative array of data to be mapped, or a column name
@param  boolean      $reverse If TRUE, perform a reverse mapping
@return array|string The mapped data or column name
Table map method