CI_DB_active_record::_merge_cache PHP Method

_merge_cache() public method

When called, this function merges any cached AR arrays with locally called ones.
public _merge_cache ( ) : void
return void
    function _merge_cache()
    {
        if (count($this->ar_cache_exists) == 0) {
            return;
        }
        foreach ($this->ar_cache_exists as $val) {
            $ar_variable = 'ar_' . $val;
            $ar_cache_var = 'ar_cache_' . $val;
            if (count($this->{$ar_cache_var}) == 0) {
                continue;
            }
            $this->{$ar_variable} = array_unique(array_merge($this->{$ar_cache_var}, $this->{$ar_variable}));
        }
        // If we are "protecting identifiers" we need to examine the "from"
        // portion of the query to determine if there are any aliases
        if ($this->_protect_identifiers === TRUE and count($this->ar_cache_from) > 0) {
            $this->_track_aliases($this->ar_from);
        }
    }