public function prefixOrderWithTable($data, $tableName)
    {
        if (count($data) == 0) {
            return $data;
        }

        foreach ($data as $key => $v) {
            // if $v is empty, we have a custom order like RAND() and do not have to prefix
            if (!empty($v)) {
                $newKey        = $tableName . '.' . trim($key, '`');
                $data[$newKey] = $v;
                unset($data[$key]);
            }
        }

        return $data;
    }
public function prefixOrderWithTable($data, $tableName)
    {
        if (count($data) == 0) {
            return $data;
        }

        foreach ($data as $key => $v) {
            // if $v is empty, we have a custom order like RAND() and do not have to prefix
            if (!empty($v)) {
                $newKey        = $tableName . '.' . trim($key, '`');
                $data[$newKey] = $v;
                unset($data[$key]);
            }
        }

        return $data;
    }
public function prefixOrderWithTable ( $ data , $ tableName ) { if ( count ( $ data ) == 0 ) { return $ data ; } foreach ( $ data as $ key => $ v ) { // if $v is empty, we have a custom order like RAND() and do not have to prefix if ( ! empty ( $ v ) ) { $ newKey = $ tableName . '.' . trim ( $ key , '`' ) ; $ data [ $ newKey ] = $ v ; unset ( $ data [ $ key ] ) ; } } return $ data ; }
Prefix fields from orderBy associated array
with table name

@param array  $data      - associative array with order data
@param string $tableName - table name to use as prefix

@return mixed
Prefix fields from orderBy associated array with table name